This repo contains data for C++ feature-test macros, including
- list of feature-test macros and their values, extracted from https://github.com/BRevzin/sd6
- short description for each macro, extracted from https://en.cppreference.com/w/cpp/feature_test
- Clang/GCC/MSVC (and their standard library implementation) support for each macro, sourced from testing and the source code
This repo only attempts to track the latest master versions of Clang/GCC/MSVC STL, not any particular release. For MSVC compiler, the latest release is tracked.
All data are located in the data.yaml
file.
This repo also contains Python scripts for various purposes, located in the tools/
directory. These include
generate_testfiles.py
, for generating files that can be used to check feature-test macro support for each implementation. Macros are grouped by their kinds. This is mostly useful for manual testing. The generated test files can be identified astest/{kind}/{impl}.cpp
, where{kind}
is one ofattribute
/language
/library
,{impl}
is one ofclang
/gcc
/msvc
. (test/library/clang.cpp
andtest/library/gcc.cpp
test for libc++ and libstdc++ respectively, although these libraries can work with different compilers.)do_test.py
, for automatically checking feature-test macro support.maketable_cppreference.py
, which generates wikicode for language/library tables that can be used in https://en.cppreference.com/w/cpp/feature_test.
In addition, there's utilities.py
, which contains utility variables/functions/classes for internal use.
These scripts must be invoked from the project root (the directory that contains data.yaml
).