[#BloombergLP-bslalg-TypeTraitHasPointerSemantics]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::TypeTraitHasPointerSemantics
:relfileprefix: ../../
:mrdocs:

Trait for types that behave as if they were fundamental pointers&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;typetraithaspointersemantics&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct TypeTraitHasPointerSemantics;
----

== Description

A type with this trait is said to have &quot;pointer semantics&quot;&period; That is the type behaves as if it were a fundamental pointer type&period; The type must define(at a minimum) `operator&ast;` and `operator&hyphen;&gt;`&period; Note that simply providing the above operators does not imply that a type has pointer semantics&period; This trait is intended for &quot;wrapper&quot; types that behave as pointers&period; Some examples of such types include `std&colon;&colon;auto&lowbar;ptr`, and `bslma&colon;&colon;ManagedPtr`&period; This trait is generally used by objects that invoke the wrapped type&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/TypeTraitHasPointerSemantics/Metafunction.adoc[`Metafunction`] 
| Metafunction that evaluates to `HasPointerSemantics&lt;TYPE&gt;&colon;&colon;type`&period;
| xref:BloombergLP/bslalg/TypeTraitHasPointerSemantics/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitHasPointerSemantics` trait tag to the `bslmf&colon;&colon;HasPointerSemantics` trait metafunction&period;
|===



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