|
|
|
|
|
by coderjames
357 days ago
|
|
> most classes are not designed to be inherited but want to expose a clean public API. > While true that all classes can be inherited That's what the 'final' keyword in C++ is for: https://en.cppreference.com/w/cpp/language/final.html "Specifies that a virtual function cannot be overridden in a derived class, or that a class cannot be derived from." |
|