[#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<t_TYPE>`. The primary use of these utilities is to create a consistent notation for using the C++03 `MovableRef<t_TYPE>` objects and the C++11 `t_TYPE&&` r‐value references. == Synopsis Declared in `<bslmf_movableref.h>` [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_TYPE`. If `t_TYPE` is already an `lvalue` reference, then `type` is `t_TYPE`. Otherwise, if `t_TYPE` is `MovableRef<T2>`, then `type` is `T2&`. This transformation reflects the semantics of _reference collapsing_ in section [dec.ref]of the standard. | xref:BloombergLP/bslmf/MovableRefUtil/AddMovableReference.adoc[`AddMovableReference`] | This `struct` template provides a metafunction that defines a nested `type` typedef that, if `t_TYPE` is not a reference type, is `MovableRef<t_TYPE>`. Otherwise, if `t_TYPE` is a specialization of `MovableRef`, `type` is the same as `t_TYPE`. Otherwise, `type` is `t_TYPE&`. This transformation reflects the semantics of _reference collapsing_ in section [dec.ref]of the standard. | xref:BloombergLP/bslmf/MovableRefUtil/Decay.adoc[`Decay`] | This `struct` template provides a metafunction that defines a nested `type` typedef that applies lvalue‐to‐rvalue, array‐to‐pointer, and function‐to‐pointer conversions that occur when an lvalue of type `t_TYPE` is used as an rvalue, and also removes `const`, `volatile`, and reference qualifiers from class types in order to model by‐value argument passing. For the purpose of this type trait, `MovableRef<T>` is considered a (movable) reference‐qualified `T`. | xref:BloombergLP/bslmf/MovableRefUtil/IsLvalueReference.adoc[`IsLvalueReference`] | This `struct` template provides a Boolean metafunction that inherits from `bsl::true_type` if the specified `t_TYPE` is an lvalue reference, and inherits from `bsl::false_type` otherwise. | xref:BloombergLP/bslmf/MovableRefUtil/IsMovableReference.adoc[`IsMovableReference`] | This `struct` template provides a Boolean metafunction that inherits from `bsl::true_type` if the specified `t_TYPE` is a specialization of `MovableRef`, and inherits from `bsl::false_type` otherwise. | xref:BloombergLP/bslmf/MovableRefUtil/IsReference.adoc[`IsReference`] | This `struct` template provides a Boolean metafunction that inherits from `bsl::true_type` if the specified `t_TYPE` is either an lvalue reference or a specialization of `MovableRef`, and inherits from `bsl::false_type` otherwise. | xref:BloombergLP/bslmf/MovableRefUtil/RemoveReference.adoc[`RemoveReference`] | This `struct` template provides a metafunction that, if the specified `t_TYPE` is a reference type, defines a nested `type` typedef of the type to which `t_TYPE` refers, and defines a nested `type` typedef of `t_TYPE` otherwise. |=== == 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. | xref:BloombergLP/bslmf/MovableRefUtil/move.adoc[`move`] | Return a movable reference to the specified `object`. | xref:BloombergLP/bslmf/MovableRefUtil/move_if_noexcept-0e.adoc[`move_if_noexcept`] | `move_if_noexcept` overloads |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#