Template:stdinfo current version
Contents |
[edit] WG21
Generates a link to a document of C++ Working Group (WG21), that is CWG/LWG page or a "proposal" file, respectively.
{{wg21|1=CWG or LWG or WG21 document-number|2=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).
[edit] 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: N4981 - 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,
[edit] 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|1=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
|
doc | document number | {{stdinfo latest draft|doc}} results in n4981
|
date | document date | {{stdinfo latest draft|date}} results in 2024-04-16
|
- 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. Results in: n3220 for C and n4981 for C++.
{{stdinfo latest draft docdate|lang=lang (optional)}}
- The document date of the latest draft of the C/C++ standard. Results in 2024-02-22 for C and 2024-04-16 for C++.
{{stdinfo next version number|lang=lang (optional)}}
- The version number of the next C/C++ standard. Results in 23 for C and 26 for C++.
- 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
{{stdinfo current version}}
- The version of the current C/C++ standard (with the prefix C or C++). Results in: C++20
[edit] 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. |