New in version 3.1.
List of C++ features known to this version of CMake.
The features listed in this global property may be known to be available to the
C++ compiler. If the feature is available with the C++ compiler, it will
be listed in the
The features listed here may be used with the
command. See the
cmake-compile-features(7) manual for information on
compile features and a list of supported compilers.
The features known to this version of CMake are listed below.
High level meta features indicating C++ standard support¶
New in version 3.8.
The following meta features indicate general support for the associated language standard. It reflects the language support claimed by the compiler, but it does not necessarily imply complete conformance to that standard.
Compiler mode is at least C++ 98.
Compiler mode is at least C++ 11.
Compiler mode is at least C++ 14.
Compiler mode is at least C++ 17.
New in version 3.12.
Compiler mode is at least C++ 20.
New in version 3.20.
Compiler mode is at least C++ 23.
New in version 3.25.
Compiler mode is at least C++ 26.
If the compiler's default standard level is at least that
of the requested feature, CMake may omit the
The flag may still be added if the compiler's default extensions mode
does not match the
<LANG>_EXTENSIONS target property,
or if the
<LANG>_STANDARD target property is set.
Low level individual compile features¶
For C++ 11 and C++ 14, compilers were sometimes slow to implement certain language features. CMake provided some individual compile features to help projects determine whether specific features were available. These individual features are now less relevant and projects should generally prefer to use the high level meta features instead. Individual compile features are not provided for C++ 17 or later.
cmake-compile-features(7) manual for further discussion of
the use of individual compile features.
Individual features from C++ 98¶
Template template parameters, as defined in
Individual features from C++ 11¶
Template aliases, as defined in N2258.
alignas, as defined in N2341.
alignof, as defined in N2341.
Generic attributes, as defined in N2761.
Automatic type deduction, as defined in N1984.
Constant expressions, as defined in N2235.
Decltype on incomplete return types, as defined in N3276.
Decltype, as defined in N2343.
Default template arguments for function templates, as defined in DR226
Defaulted functions, as defined in N2346.
Defaulted move initializers, as defined in N3053.
Delegating constructors, as defined in N1986.
Deleted functions, as defined in N2346.
Enum forward declarations, as defined in N2764.
Explicit conversion operators, as defined in N2437.
Extended friend declarations, as defined in N1791.
Extern templates, as defined in N1987.
finalkeyword, as defined in N2928, N3206 and N3272.
__func__identifier, as defined in N2340.
Initializer lists, as defined in N2672.
Inheriting constructors, as defined in N2540.
Inline namespaces, as defined in N2535.
Lambda functions, as defined in N2927.
Local and unnamed types as template arguments, as defined in N2657.
long longtype, as defined in N1811.
Exception specifications, as defined in N3050.
Non-static data member initialization, as defined in N2756.
Null pointer, as defined in N2431.
overridekeyword, as defined in N2928, N3206 and N3272.
Range-based for, as defined in N2930.
Raw string literals, as defined in N2442.
Reference qualified functions, as defined in N2439.
Right angle bracket parsing, as defined in N1757.
R-value references, as defined in N2118.
Size of non-static data members, as defined in N2253.
Static assert, as defined in N1720.
Strongly typed enums, as defined in N2347.
Thread-local variables, as defined in N2659.
Automatic function return type, as defined in N2541.
Unicode string literals, as defined in N2442.
Uniform initialization, as defined in N2640.
Unrestricted unions, as defined in N2544.
User-defined literals, as defined in N2765.
Variadic macros, as defined in N1653.
Variadic templates, as defined in N2242.
Individual features from C++ 14¶
Aggregate default initializers, as defined in N3605.
[[deprecated]]attribute, as defined in N3760.
Binary literals, as defined in N3472.
Contextual conversions, as defined in N3323.
decltype(auto)semantics, as defined in N3638.
Digit separators, as defined in N3781.
Generic lambdas, as defined in N3649.
Initialized lambda captures, as defined in N3648.
Relaxed constexpr, as defined in N3652.
Return type deduction on normal functions, as defined in N3386.
Variable templates, as defined in N3651.