在c ++ 14中,__ cplusplus是否有标准定义? [英] Is there a standard definition for __cplusplus in c++14?

查看:99
本文介绍了在c ++ 14中,__ cplusplus是否有标准定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一些预处理程序,并且我想为C ++ 14中的 __ cplusplus 定义一个更准确的数字。该标准是否规定了一项?

I'm looking to setup some preprocessor stuff, and I'd like a more exact number for what __cplusplus in C++14 should be defined as. Is there one mandated by the standard?

推荐答案

N3936 * §16.8[cpp.predefined] / p1:

N3936* §16.8 [cpp.predefined]/p1:


1以下宏名称应由实现定义:

1 The following macro names shall be defined by the implementation:

__ cplusplus

名称 __ cplusplus 被定义为
编译C ++转换单元时的值 201402L

N3936是成为C ++ 14的最终工作草案,并且编号 201402L 与发送C ++ 14标准进行最终投票的会议一致(< a href = http://isocpp.org/blog/2014/02/trip-report rel = noreferrer> 2014年2月)。

N3936 is the final working draft that became C++14, and the number 201402L is consistent with the meeting at which the C++14 standard is sent out for final balloting (February 2014).

* 对获取C ++标准副本感兴趣的人应该查看在哪里可以找到当前的C或C ++标准文档

*Those interested in obtaining a copy of the C++ standard should check out Where do I find the current C or C++ standard documents?

这篇关于在c ++ 14中,__ cplusplus是否有标准定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆