Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
490 views
in Technique[技术] by (71.8m points)

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...