Is the sealed command c++ 0x or is it only microsoft who has it

为君一笑 提交于 2019-11-28 08:26:24

问题


Is the sealed command going to be in c++ 0x or is it only MS who use it?


回答1:


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.




回答2:


sealed is a really .net term and so is specific to MS C++/CLI.




回答3:


Sealed is used to declare a .net class that cannot be derived from. It's available in C++ but on for .net types in MC++.



来源:https://stackoverflow.com/questions/7026462/is-the-sealed-command-c-0x-or-is-it-only-microsoft-who-has-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!