[#BloombergLP-bslmf-MovableRefUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmf.adoc[bslmf]::MovableRefUtil
:relfileprefix: ../../
:mrdocs:

This `struct` provides a collection of utility functions operating on objects of type `MovableRef&lt;t&lowbar;TYPE&gt;`&period; The primary use of these utilities is to create a consistent notation for using the C&plus;&plus;03 `MovableRef&lt;t&lowbar;TYPE&gt;` objects and the C&plus;&plus;11 `t&lowbar;TYPE&amp;&amp;` r&hyphen;value references&period;

== Synopsis

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

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

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/MovableRefUtil/AddLvalueReference.adoc[`AddLvalueReference`] 
| This `struct` template provides a metafunction that defines a nested `type` typedef that is an lvalue reference to `t&lowbar;TYPE`&period; If `t&lowbar;TYPE` is already an `lvalue` reference, then `type` is `t&lowbar;TYPE`&period; Otherwise, if `t&lowbar;TYPE` is `MovableRef&lt;T2&gt;`, then `type` is `T2&amp;`&period; This transformation reflects the semantics of _reference collapsing_ in section &lsqb;dec&period;ref&rsqb;of the standard&period;
| xref:BloombergLP/bslmf/MovableRefUtil/AddMovableReference.adoc[`AddMovableReference`] 
| This `struct` template provides a metafunction that defines a nested `type` typedef that, if `t&lowbar;TYPE` is not a reference type, is `MovableRef&lt;t&lowbar;TYPE&gt;`&period; Otherwise, if `t&lowbar;TYPE` is a specialization of `MovableRef`, `type` is the same as `t&lowbar;TYPE`&period; Otherwise, `type` is `t&lowbar;TYPE&amp;`&period; This transformation reflects the semantics of _reference collapsing_ in section &lsqb;dec&period;ref&rsqb;of the standard&period;
| xref:BloombergLP/bslmf/MovableRefUtil/Decay.adoc[`Decay`] 
| This `struct` template provides a metafunction that defines a nested `type` typedef that applies lvalue&hyphen;to&hyphen;rvalue, array&hyphen;to&hyphen;pointer, and function&hyphen;to&hyphen;pointer conversions that occur when an lvalue of type `t&lowbar;TYPE` is used as an rvalue, and also removes `const`, `volatile`, and reference qualifiers from class types in order to model by&hyphen;value argument passing&period; For the purpose of this type trait, `MovableRef&lt;T&gt;` is considered a (movable) reference&hyphen;qualified `T`&period;
| xref:BloombergLP/bslmf/MovableRefUtil/IsLvalueReference.adoc[`IsLvalueReference`] 
| This `struct` template provides a Boolean metafunction that inherits from `bsl&colon;&colon;true&lowbar;type` if the specified `t&lowbar;TYPE` is an lvalue reference, and inherits from `bsl&colon;&colon;false&lowbar;type` otherwise&period;
| xref:BloombergLP/bslmf/MovableRefUtil/IsMovableReference.adoc[`IsMovableReference`] 
| This `struct` template provides a Boolean metafunction that inherits from `bsl&colon;&colon;true&lowbar;type` if the specified `t&lowbar;TYPE` is a specialization of `MovableRef`, and inherits from `bsl&colon;&colon;false&lowbar;type` otherwise&period;
| xref:BloombergLP/bslmf/MovableRefUtil/IsReference.adoc[`IsReference`] 
| This `struct` template provides a Boolean metafunction that inherits from `bsl&colon;&colon;true&lowbar;type` if the specified `t&lowbar;TYPE` is either an lvalue reference or a specialization of `MovableRef`, and inherits from `bsl&colon;&colon;false&lowbar;type` otherwise&period;
| xref:BloombergLP/bslmf/MovableRefUtil/RemoveReference.adoc[`RemoveReference`] 
| This `struct` template provides a metafunction that, if the specified `t&lowbar;TYPE` is a reference type, defines a nested `type` typedef of the type to which `t&lowbar;TYPE` refers, and defines a nested `type` typedef of `t&lowbar;TYPE` otherwise&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/MovableRefUtil/access.adoc[`access`] 
| Return an lvalue reference to the object referenced by the specified `ref` object&period;
| xref:BloombergLP/bslmf/MovableRefUtil/move.adoc[`move`] 
| Return a movable reference to the specified `object`&period;
| xref:BloombergLP/bslmf/MovableRefUtil/move_if_noexcept-0e.adoc[`move&lowbar;if&lowbar;noexcept`] 
| `move&lowbar;if&lowbar;noexcept` overloads
|===



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