Template:feature test macro
Feature testing macro: | {{{1}}}
|
Contents |
WG21
Generates a link to a document of C++ Working Group (WG21), that is CWG/LWG page or a "proposal" file, respectively.
{{wg21|CWG or LWG or WG21 document-number |full (optional)}}
- The full (optional) argument works only with "proposal" documents, and applying it results in the generation of an additional link to GitHub page (where the proposal is processed by WG21).
stddoc
Used to generate a link to a document of WG14/WG21.
The WG/language (C or C++) is determined by {{get lang}}, unless the lang (optional) argument with a value c or cpp is provided (if supported).
{{stddoc|document number |link title (optional)|lang=lang (optional)}}
- Generate a link to a WG14/WG21 document with the given document number. A custom link title can be provided, it is the capitalized document number by default. In C mode, document number can contain a file extension, e.g.
n2081.htm
. In C++ mode, there is no need to know/pass the extension due to wg21.link service automation.- Example:
{{stddoc|p2443r1}}
results in: P2443R1 - Example:
{{stddoc|P2443R1|views::chunk_by}}
results in: views::chunk_by - Example:
{{stddoc|n2731|C23 draft|lang=c}}
results in: C23 draft - Example:
{{stddoc|n2081.htm|n2081|lang=c}}
results in: n2081
- Example:
{{stddoc latest draft|link title (optional)|lang=lang (optional)}}
- Generate a link to the latest draft of the next C/C++ standard.
- Presently,
{{stddoc latest draft}}
results in: N4993 - Presently,
{{stddoc latest draft|Latest C++ draft}}
results in: Latest C++ draft - Presently,
{{stddoc latest draft|Latest C draft|lang=c}}
results in: Latest C draft
- Presently,
stdinfo
Used to provide information of C/C++ standardization.
- The language (C or C++) is determined by {{get lang}}, unless the lang (optional) argument with a value c or cpp is provided (if supported).
{{stdinfo latest draft|rev or doc or date |lang=lang (optional)}}
- Is a hub for C/C++ standard draft information. Depending on the value of the first argument, the returned info is:
value info Example rev version number {{stdinfo latest draft|rev}}
results in 26{{stdinfo latest draft|rev|lang=c}}
results in 2ydoc document number {{stdinfo latest draft|doc}}
results in n4993{{stdinfo latest draft|doc|lang=c}}
results in n3301date document date {{stdinfo latest draft|date}}
results in 2024-10-16{{stdinfo latest draft|date|lang=c}}
results in 2024-07-28
- Is used inside the following higher-level templates:
- {{stdinfo latest draft docnum}}, {{stdinfo latest draft docdate}}, {{stdinfo next version number}}, {{stdinfo next version}}.
{{stdinfo latest draft docnum|lang=lang (optional)}}
- The document number of the latest draft of the C/C++ standard.
- For C results in n3301.
- For C++ results in n4993.
{{stdinfo latest draft docdate|lang=lang (optional)}}
- The document date of the latest draft of the C/C++ standard.
- For C results in 2024-07-28.
- For C++ results in 2024-10-16.
{{stdinfo next version number|lang=lang (optional)}}
- The version number of the next C/C++ standard.
- For C results in 2y.
- For C++ results in 26.
- The version of the next C/C++ standard (with the prefix C or C++). Results in: C++
{{stdinfo current version number}}
- The version number of the current C/C++ standard. Results in: 20
- The version of the current C/C++ standard (with the prefix C or C++). Results in: C++20
Current language
{{get lang}}
- If the page title begins with "c/", then the output value is "c", if the page title begins with "cpp/", then the output value is "cpp". Otherwise the output value is "cpp".
{{get lang formal}}
- If the page title begins with "c/", then the output value is "C", if the page title begins with "cpp/", then the output value is "C++". Otherwise the output value is "C++".
The above documentation is transcluded from Template:stddoc/doc. (edit | history) Subpages of this template. |