gpt4 book ai didi

c++ - 如何判断您的编译器支持哪个版本的 ISO C++ 标准?

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:57:51 25 4
gpt4 key购买 nike

<分区>

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更加完整。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com