Is the sealed command c++ 0x or is it only microso

2019-01-28 04:55发布

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

3条回答
Luminary・发光体
2楼-- · 2019-01-28 05:11

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.

查看更多
不美不萌又怎样
3楼-- · 2019-01-28 05:14

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

查看更多
再贱就再见
4楼-- · 2019-01-28 05:22

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++.

查看更多
登录 后发表回答