Is the sealed
command going to be in c++ 0x or is it only MS who use it?
sealed (C++/CLI and C++/CX) sealed is a context-sensitive keyword for ref classes that indicates that a virtual member cannot be overridden, or that a type cannot be used as a base type. The ISO C++11 Standard language introduced the final keyword. Use final on standard classes, and sealed on ref classes.
When applied to a class, the sealed modifier prevents other classes from inheriting from it. In the following example, class B inherits from class A , but no class can inherit from class B . You can also use the sealed modifier on a method or property that overrides a virtual method or property in a base class.
C++0x has a special identifier final
which means the same as sealed
for classes in C++/CLI. It prevents a class from being derived from.
Read about sealed in Wikipedia
So the answer is basically: it already is but under a different name and has a different syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With