Created
February 5, 2013 19:46
-
-
Save acmorrow/4717054 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C++11 gives us finer control over inheritance: | |
struct Base { | |
virtual void doThing() = 0; | |
}; | |
struct Derived final : public Base { | |
virtual void doThang() override { // Won't compile, because it doesn't override | |
} | |
} | |
struct Nope : public Derived { // Won't compile, Derived is final | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment