Template:source/doc

These are templates used for syntax highlighting.

c
 * A base template that is intended to highlight code inline. is optional; value returned by get lang is used by default. Applies a semi-transparent dark background.
 * Example: results in
 * Example: results in
 * Note that is necessary if an equal sign  is present somewhere in the expression.


 * For code snippets in ranges (such as ), the range template family is preferred.

c multi
 * Alike c, supports multi-line code snippets (up to 5 lines). is optional; value returned by get lang is used by default. Code highlighting does not span across lines: avoid splitting string literals  and multi-line comments.
 * Example (note the padding spaces):
 * or (note the convenient indentation):
 * results in.
 * results in.


 * Note that //// is necessary if an equal sign is present somewhere in the corresponding line.

c/core
 * Same as c just no background (e.g. the bounding box) is applied. Intended to be used in other templates only.
 * Example: results in

co
 * Same as c/core just no background (e.g. the bounding box) is applied. Intended to be used in tables where bounding boxes are set by the table's frame.
 * Example: results in

box
 * Alike c, applies one shared bounding box to a formatted text generated by several given tags.
 * Example: results in
 * Example: results in

cc
 * A base template that is intended to highlight larger amounts of code inline. Usually used when the c template doesn't display the code readable, but source would waste too much space. is optional; value returned by get lang is used by default.
 * Example: results in

source
 * A base template that is intended to highlight large amounts of code. is optional; value returned by get lang is used by default.
 * For example, the code:


 * results in

code1
 * A base template for representing code snippets in Possible implementation sections. The arguments, , etc. are code for each version of the function template being described (e.g., std -family in the case below). If no code is supplied at all, the template results in todo. is optional &mdash; value returned by get lang is used by default.
 * For example, the code:


 * results in:

code1 Additional params: ...
 * Same as eq fun with two additional capabilities:


 * A substitution of any of the default title with a custom one via optional parameter(s) Your title, ..., Your title . Default titles are the same as of aforementioned template eq fun, i.e. First version, ..., Fourth version.
 * An auto-generation of internal link "under" the title text. If is specified, this template generates an internal HTML link with target name "Version num". For example, if  the internal link "#Version 3" will be generated. This capability works together with generation of internal anchors by dcla and dcl rev multi to link Possible implementation code sections to declarations in Synopsis.

example
 * A base template to represent examples. If is not present, the template results in todo.  defaults to a value returned by get lang.  specifies the output which is displayed by the code. If the output is not deterministic,  should be set to  to indicate this (then "Possible output:" is shown instead of just "Output:").


 * The following language standards are available:
 * cxx98, cxx03, cxx11, cxx14, c89, c99, c11.


 * For example, the code:


 * results in: