Namespaces
Variants

Template:standard library support row

From cppreference.com

Template

Used for creating a row in the compiler support tables for C++ library features. The list of displayed compilers can grow/shrink depending on the C++ version. If a new compiler needs to be added, this template must be updated in sync with {{standard library support}}.

The parameters are as follows:

Parameter Required? Meaning
feature Yes A value for the feature column. Use page links to the areas on the wiki explaining the feature, if possible.
reference Yes The normative reference(s) for the changes to the standard defining the feature. If more than one reference is specified, a space should be used as a delimiter, e.g. reference=P1209R0 P1115R3.
version Yes A string, such as c++11 or c++23, representing the C++ version. Used for forward compatibility with potentially changing set of compilers.
id No An anchor's name to refer to this cell. If a feature-testing macro for given feature exists, then its name should be used followed by value(s), e.g. id=__cpp_lib_ranges 202202L 202207L 202211L 202302L. Up to 4 dates per one FTM are supported.
id1...id15 No Additional feature-testing macros, up to 15, can be provided, e.g.

id1=__cpp_lib_format 202304L 202305L

id2=__cpp_lib_barrier 201907L 202302L

...

id15=__cpp_lib_chrono 201510L 201611L 201907L 202306L

The remaining parameters are all optional and specify the compiler support for the feature, typically using {{yes}}, {{maybe}} and {{n/a}} tags. If left unspecified, then {{no}} will be used.

Example:

{{standard library support|std=c++23|
...
{{standard library support row
|feature={{c/core|views::chunk}} and {{c/core|views::slide}}
|reference=P2442R1
|version=c++23
|id=__cpp_lib_ranges_chunk 202002L
|gcc={{yes|13}}
|msvc={{yes|{{msvc ver|19.33}}}}
}}
{{standard library support row
|feature={{c/core|views::chunk_by}}
|reference=P2443R1
|version=c++23
|id=__cpp_lib_ranges_chunk_by 202002L
|msvc={{yes|{{msvc ver|19.33}}}}
|clang={{yes|18}}
|gcc={{yes|13}}
|aclang={{maybe|3.14}}
}}
...
}}

Results in:

C++23 feature

 
Paper(s)

 
GCC libstdc++
Clang libc++
MSVC STL
Apple Clang*
views::chunk and views::slide  (FTM)* P2442R1 13 19.33*
views::chunk_by  (FTM)* P2443R1 13 18 19.33* 3.14
 

C++23 feature
 

Paper(s)
GCC libstdc++
Clang libc++
MSVC STL
Apple Clang*