Modèle:cpp/numeric/random/get types
De cppreference.com
This is generic description of all ***/get_types templates.
***/get_types templates are used for easier definition of C++ template parameters. Often several related C++ templates have a non-member function which has identical behavior whichever of those templates are passed as parameter. For example, most of C++ containers have comparison operators that behave identically for most of the containers. We usually want to put the article for such functions in a template to reduce maintenance burden. The problem is that often C++ templates accepted as function arguments have different template arguments, so we end up with a huge {{#switch:
statement.
This template solves the issue by defining the template arguments as variables.
-
{{#var:types}}
contains the long type description (use it astemplate< {{#var:types}} >
). -
{{#var:types_short}}
contains the short type description (use it asType<{{#var:types_short}}>
).
The above documentation is transcluded from Template:get_types/doc. (edit | history) Subpages of this template. |