确定C ++ 0x的可用性 [英] Determine C++0x availability

查看:46
本文介绍了确定C ++ 0x的可用性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定编译时C ++ 0x功能是否可用。有一个通用的预处理器宏吗?我正在使用Visual Studio 2010的编译器和Intel的编译器。

I'm trying to determine if C++0x features are available when compiling. Is there a common preprocessor macro? I'm using Visual Studio 2010's compiler and Intel's compiler.

推荐答案

__ cplusplus 具有一个值大于 199711L

也就是说,并非所有编译器都会填写该值。最好使用Roger的解决方案。

That said, not all compilers will fill this value out. Better to use Roger's solution.

这篇关于确定C ++ 0x的可用性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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