What are the 'ref' and 'sealed' keywords in C++?

sealed in C++/CLI is roughly equivalent to final in C++11.


If you are interested in the new C++/CX use of these keywords to project WinRT APIs into MS Visual C++, you may enjoy this video: http://channel9.msdn.com/events/BUILD/BUILD2011/TOOL-532T with these slides: http://video.ch9.ms/build/2011/slides/TOOL-532T_Sutter.pptx . See esp. slides 8-13. There are other talks with yet more information referenced on slide 29.


This is C++/CLI.

A ref class is a managed type.
sealed means that the class cannot be inherited


Thus summary is that "ref" and "sealed" are not standard C++ keywords. They are used in microsoft version.

Tags:

C++

Ref

Sealed