Namespaces
Variants

Template:rlpsd

From cppreference.com

no section name

[edit] [{{purge}}] Template documentation

These are templates that are used to create HTML hyperlinks and HTML anchors.

Anchors

{{anchor|1 |2 (optional)|3 (optional)|... (optional)|10 (optional)}} - creates one or more (up to 10) HTML anchors to refer to.

Absolute links

Normal font

{{lt|path |title (optional)}} - creates a link to a page using absolute path. The default title is only the last part of the path.

Example: {{lt|cpp/language/statements}} results in the link: statements.
Example: {{lt|cpp/language/statements|Labeled statements}} results in the link: Labeled statements.
Note: the previous example is just another way to create the same link using the standard template
[[cpp/language/statements|Labeled statements]], which also results in Labeled statements.

{{ls|path#section }} - makes a link to a section (anchor) on a page given by absolute path. The section text is also used as the title. To create a link on the same page the path part should be empty.

Example: {{ls|cpp/language/lambda#Syntax}} results in the link: Syntax.
To create a link to a section/anchor within the current page the path part should be omitted.
Example: {{ls|#Relative links}} results in the link: Relative links (i.e. a link to the section in this page).

{{lsd|path#Section }} ("lsd" stands for "Link to Section De-capitalized") - almost the same as {{ls}} except it de-capitalizes the first letter of displayed section name. To create a link on the same page the path part should be empty.

Example: {{lsd|cpp/language/array#Arrays of unknown bound}} results in the link: arrays of unknown bound.
Example: {{lsd|#Relative links}} results in the link: relative links (i.e. a link to the section in this page).

Teletype font

{{ltt|path |title (optional)}} - creates a link to a page using absolute path. The default title is only the last part of the path.

Example: {{ltt|cpp/language/switch}} results in the link: switch.
Example: {{ltt|cpp/language/switch|switch(expr)}} results in the link: switch(expr).

{{ltf|path |title (optional)|args=arguments (optional)}} - creates a link to a page using absolute path. The default title is only the last part of the path. Parentheses indicating function are appended, which enclose the optional arguments.

Example: {{ltf|cpp/error/terminate}} results in the link: terminate().
Example: {{ltf|cpp/error/terminate|std::terminate}} results in the link: