用C类Java注解++ [英] Java-like annotations in C++
本文介绍了用C类Java注解++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么类似于C Java的注解++?
Is there something like Java's annotations in C++ ?
例如,在@Override注释标记它会覆盖另一个函数的函数,如果不会,它会在编译时给出一个错误。
For example, the @Override annotation marks a function that it overrides another function, and if it wouldn't, it would give an error at compile time.
我要寻找一个在C ++这样的事情。
I am looking for something like this in C++.
推荐答案
的C ++ 0x 将有此功能,您可以显式地指定一个成员函数是否是为了重写基类的功能,使用编译器等等产生的默认实现。
C++0x will have this feature, where you can explicitly specify whether a member function is meant to override a base class' function, use a default implementation generated by the compiler and much more.
这篇关于用C类Java注解++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文