<分区>
Possible Duplicate:
How to determine the version of the C++ standard used by the compiler?
您的程序有没有办法在编译时确定这一点?是否有可以使用的预处理器宏?
我知道 g++ 有这个 nice matrix of c++0x/c++11 feature support .这是否适用于其他流行的编译器?是否有任何标准(事实上或其他方式)使用预处理器来测试给定功能是否存在?
有一个关于这个的问题,但答案似乎不是很完整:How to determine the version of the C++ standard used by the compiler?
我知道 Boost.Config 会这样做,但它是如何做到的呢?很高兴知道我是否出于某种原因不想使用 Boost。
我将其作为拷贝关闭,因为有人编辑了其中一个 answers in the original question更加完整。