Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++11 feature checking

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?

like image 680
Nordlöw Avatar asked Apr 19 '12 09:04

Nordlöw


1 Answers

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

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

like image 120
mirk Avatar answered Nov 03 '22 10:11

mirk