Skip to content

Instantly share code, notes, and snippets.

@acmorrow
Created February 5, 2013 19:46
Show Gist options
  • Save acmorrow/4717054 to your computer and use it in GitHub Desktop.
Save acmorrow/4717054 to your computer and use it in GitHub Desktop.
// 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