Sun 编译器是否有将函数标记为弃用的符号,如 GCC 的 __attribute__ ((deprecated))
或 MSVC 的 __declspec(deprecated)
?
最佳答案
似乎可以在支持#warning
的任何 编译器上运行的一种解决方案是:
- 将有问题的 header 复制到一个新的、提升的 header 名称
- 从提升的头文件中删除不推荐使用的函数
- 添加到旧头文件:
#warning "This header is deprecated. Please use {new header name}"
关于c++ - Sun 的 C++ 编译器的 "Deprecated"符号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/893509/