[#bsl-add_pointer-080]
= xref:bsl.adoc[bsl]::add&lowbar;pointer
:relfileprefix: ../
:mrdocs:

This `struct` template implements the `add&lowbar;pointer` meta&hyphen;function defined in the C&plus;&plus;11 standard &lsqb;meta&period;trans&period;ptr&rsqb;, providing an alias, `type`, that returns the result&period; If the (template parameter) `t&lowbar;TYPE` is not a reference type, then `type` is an alias to a pointer type that points to `t&lowbar;TYPE`&semi; otherwise, `type` is an alias to a pointer type that points to the type referred to by the reference `t&lowbar;TYPE`, unless it is not legal to form such a pointer type, in which case `type` is an alias for `t&lowbar;TYPE`&period;

== Synopsis

Declared in `&lt;bslmf&lowbar;addpointer&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;TYPE&gt;
struct add&lowbar;pointer;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:bsl/add_pointer-080/type.adoc[`type`] 
| This `typedef` is an alias to a pointer type that points to the (template parameter) `t&lowbar;TYPE` if it is not a reference type&semi; otherwise, this `typedef` is an alias to a pointer type that points to the type referred to by the reference `t&lowbar;TYPE`&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:bsl/add_pointer-085.adoc[`add&lowbar;pointer&lt;t&lowbar;TYPE&&gt;`] 
| If we can form a reference to `t&lowbar;TYPE`, then we can also form a pointer to it&period; In particular, we know that it is not `void` (which should still work) or an &quot;abominable&quot; function type with a trailing cv&hyphen;qualifier&period; Note that this partial specialization is necessary to avoid falling into degenerate (non&hyphen;compiling) cases in the implementation meta&hyphen;program&period;
| xref:bsl/add_pointer-05.adoc[`add&lowbar;pointer&lt;t&lowbar;TYPE&&&gt;`] 
| If we can form a reference to `t&lowbar;TYPE`, then we can also form a pointer to it&period; In particular, we know that it is not `void` (which should still work) or an &quot;abominable&quot; function type with a trailing cv&hyphen;qualifier&period; Note that this partial specialization is necessary to avoid falling into degenerate (non&hyphen;compiling) cases in the implementation meta&hyphen;program&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
