C ++ 11功能检查 [英] C++11 feature checking

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

问题描述

如何检查各个C ++ 0x / C ++ 11语言功能的存在?我知道Clang有一个很好的系统。 GCC,Visual Studio或Boost是什么?我想一个办法是检测编译器版本,并将其与该版本中引入的功能联系起来。但这是麻烦。是否有人已经这样做?

How do I check for presence of individual C++0x/C++11 language features? I know Clang has a nice system for this. What about GCC, Visual Studio or Boost? I guess one way to do it is to detect the compiler version and relate that to the features introduced in that version. But that is cumbersome. Has someone already done that?

推荐答案

boost config 附带一个脚本来检查一些但不是所有的C ++ 11功能。

boost config comes with a script to check for some but not all C++11 features.

config-file包含每个功能的宏。

It generates a config-file with macros for each feature.

这篇关于C ++ 11功能检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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