Template:cast req2
This is one of the templates used to specify that some type must be convertible to another. All these templates can emit either of the requirements that it must be possible to convert an object of particular type to another type or it must be possible to dereference an object of particular type and then convert it to another type. This behavior depends an the supplied parameters (t
means plain type, p
- type that must be dereferenced first).
{{cast rreq| base_type| rt=type or rp=pointer_type}} - base_type must be convertible to rt or *rp.
{{cast req1| base_type| t1=type or p1=pointer_type}} - t1
or *p1
must be convertible to base_type.
{{cast req2| base_type1| base_type2| t1=type or p1=pointer_type| t2=type or p2=pointer_type (optional)}} - t1
or *p1
must be convertible to base_type1 or t2
or *p2
must be convertible to base_type2. If neither t2
nor p2
is supplied, it is assumed that t1
or *p1
must be convertible to both base_type1 or base_type2.
Subpages of this template. |