perl中可以声明 use 5.010申明代码必须由5.10以上的解析器解析c++中有没有类似的声明语句声明代码必须由c++11以上的编译器编译,而不是提示语法错误
__cplusplus is a predefined macro
The value for c++14 is 201402L
The value for c++11 is 201103L
The value for c++98 is 199711L
You can write like this
#if __cplusplus < 201103L # error "请使用c++11进行编译" #endif
__cplusplus is a predefined macro
The value for c++14 is 201402L
The value for c++11 is 201103L
The value for c++98 is 199711L
You can write like this