C++ identifier with special meaning: final (since C++11)
Usage
-
finalspecifier
Example
struct b0 final {};
struct d0 : b0 {}; // Error: cannot derive from final base
struct b1
{
virtual void f0() final;
virtual void f1();
};
struct d1 : b1 // OK
{
void f0(); // Error: cannot override final function
void f1(); // OK
};
See also
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/identifier_with_special_meaning/final