Template:par begin
|
|
This high-risk template has been protected from editing to prevent vandalism. Please discuss any changes on the talk page. |
This is one of the family of templates used for creation of parameter list.
List template families
- dsc **** : For creation of member variable/function lists.
- dcl **** : For creation of detailed declaration lists (those including actual declaration code).
- sdsc **** : For creation of lists representing various syntaxes of a language feature. Used in subpages of cpp/language.
- par **** : For creation of lists explaining function parameters.
- spar **** : For creation of lists explaining syntax parameters.
- nv **** : For creation of feature lists in navbars.
- elink **** : For creation of External links lists.
{{par begin}}
- starts the parameter list
{{par end}}
- ends the parameter list
{{par|parameter }}
- adds an item to the parameter list
{{par hreq}}
- results in "Type requirements"
{{par req|requirement }}
- adds a generic type requirement
{{par req named|parameter name |req1 |req2 (optional)|... |reqn (optional)|overload=applicable overload (optional)|overloads=applicable overloads (optional)|notes=notes (optional)}}
- adds a named requirement
{{par req named deref|expression |req1 |req2 (optional)|... |reqn (optional)|overload=applicable overload (optional)|overloads=applicable overloads (optional)|notes=notes (optional)}}
- adds a named requirement on the result of dereference of type
{{par req insertable|parameter name |req1 |req2 (optional)|req3 (optional)|target=insert target (optional)|overload=applicable overload (optional)|overloads=applicable overloads (optional)|notes=notes (optional)}}
- adds DefaultInsertable, CopyInsertable and MoveInsertable requirements, if
targetis not provided, the default insert target is*this
{{par inc|location |param1 (optional)|param2 (optional)|... }}
- Sets
dcl-list-template-namevariable to location, includes the template from location and unsets the variable. Use this template whenever copying param list items from a template; this will add an edit link to them. The unnamed parameters param1, param2, ... are passed to the template.
{{par range|1=first (optional)|2=last (optional)|3=to |range="" (optional)|items=elements (optional)|sentinel=yes (optional)}}
- adds "the <range> range of <items> <3>" to the parameter list.
Specific cases
- functions passed as parameters:
{{par pred0|parameter name |value=return value (optional)|condition }}
- predicate with no arguments
{{par pred1|parameter name |value=return value (optional)|condition |t1=type |p1=pointer type }}
- unary predicate (only one of t1 and p1 can be provided)
{{par pred2|parameter name |value=return value (optional)|condition |t1=type |p1=pointer type |t2=type (optional)|p2=pointer type (optional)}}
- binary predicate (only one of t1 and p1, and one of t2 and p2 can be provided)
{{par pred2 eq|parameter name |t1=type |p1=pointer type |t2=type (optional)|p2=pointer type (optional)}}
- binary equality predicate (only one of t1 and p1, and one of t2 and p2 can be provided)
{{par cmp|parameter name |value=return value (optional)|condition |t1=type |p1=pointer type |t2=type (optional)|p2=pointer type (optional)}}
- comparison function (only one of t1 and p1, and one of t2 and p2 can be provided)
{{par cmp ord|parameter name |value=return value (optional)|condition |t1=type |p1=pointer type |t2=type (optional)|p2=pointer type (optional)}}
- comparison function for ordering (only one of t1 and p1, and one of t2 and p2 can be provided)
{{par ccmp|parameter name |additional explanation (optional)}}
- C-style comparison function
{{