[#BloombergLP-bslalg-NothrowMovableWrapper-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::NothrowMovableWrapper :relfileprefix: ../../ :mrdocs: An object of this type wraps a value of the specified `TYPE`, and provides no other functionality other than returning the wrapped object. The move constructor is guaranteed not to throw, even if the move constructor for `TYPE` has no such guarantee. The user is thus asserting that the move constructor for the wrapped object _will not_ throw, even if it is allowed to. Constraints: this class can be instantiated on object types only, i.e., not references, arrays, or function types (though function pointers are OK). == Synopsis Declared in `<bslalg_nothrowmovablewrapper.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class NothrowMovableWrapper; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/ValueType.adoc[`ValueType`] | Alias for the wrapped `TYPE`. | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/allocator_type.adoc[`allocator_type`] | Type of allocator to use. If `TYPE` is not allocator‐aware, then this is a private dummy type that will disable use of any constructor that takes an allocator. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/2constructor-0c.adoc[`NothrowMovableWrapper`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/2destructor.adoc[`~NothrowMovableWrapper`] [.small]#[destructor]# | Destroy this object, invoking `TYPE`s destructor. | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/get_allocator.adoc[`get_allocator`] | Return the allocator used to construct this object. Note that this method will fail to instantiate unless `TYPE` is allocator‐aware. | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/unwrap-02.adoc[`unwrap`] | `unwrap` overloads | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/2conversion-02.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<NothrowMovableWrapper, IsBitwiseMoveable, bslmf::IsBitwiseMoveable<TYPE>::value>`] | Declare `NothrowMovableWrapper` as bitwise moveable when `TYPE` is. | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/2conversion-0e.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<NothrowMovableWrapper, UsesAllocatorArgT, bslma::UsesBslmaAllocator<TYPE>::value>`] | Declare that `NothrowMovableWrapper` uses the leading‐allocator convention when `TYPE` is allocator‐aware. | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/2conversion-06.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<NothrowMovableWrapper, UsesBslmaAllocator, bslma::UsesBslmaAllocator<TYPE>::value>`] | Declare whether `NothrowMovableWrapper` uses a `bslma` allocator. | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/2conversion-07.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<NothrowMovableWrapper, is_nothrow_move_constructible>`] | Declare that `NothrowMovableWrapper` is nothrow move constructible. | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/2conversion-0f.adoc[`operator ValueType&`] | Return a reference offering modifiable access to the wrapped object. | xref:BloombergLP/bslalg/NothrowMovableWrapper-02/2conversion-03.adoc[`operator ValueType const&`] | Return a reference offering const access to the wrapped object. |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslalg/NothrowMovableWrapper-09.adoc[`NothrowMovableWrapper<NothrowMovableWrapper<TYPE>>`] | This specialization is for wrapped types. We do not support wrapping a wrapped type. | xref:BloombergLP/bslalg/NothrowMovableWrapper-05.adoc[`NothrowMovableWrapper<NothrowMovableWrapper<TYPE> const>`] | This specialization is for wrapped types. We do not support wrapping a wrapped type. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#