clang和gcc各版本默认的cpp标准

clang 16之后 c17

By default, Clang 16 or later builds C++ code according to the C++17 standard. You can use Clang in C++17 mode with the -std=c++17 option (use -std=c++1z in Clang 4 and earlier).

clang 3.4之后 c14

By default, Clang builds C++ code according to the C++14 standard. You can use Clang in C++14 mode with the -std=c++14 option (use -std=c++1y in Clang 3.4 and earlier).

GCC11之后: c17

C++17 mode is the default since GCC 11; it can be explicitly selected with the -std=c++17 command-line flag, or -std=gnu++17 to enable GNU extensions as well. Some C++17 features are available since GCC 5, but support was experimental and the ABI of C++17 features was not stable until GCC 9.

GCC 6.1至 10 : c14

GCC has full support for the of the 2014 C++ standard. This mode is the default in GCC 6.1 up until GCC 10 (inclusive); it can be explicitly selected with the -std=c++14 command-line flag, or -std=gnu++14 to enable GNU extensions as well.

GCC has full support for the 1998 C++ standard as modified by the 2003 technical corrigendum and some later defect reports, excluding the export feature which was later removed from the language. This mode is the default in GCC versions prior to 6.1; it can be explicitly selected with the -std=c++98 command-line flag, or -std=gnu++98 to enable GNU extensions as well.

  • 6
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值