Constructors

Synopses

Declared in <bslalg_nothrowmovablewrapper.h>

Value‐initialize the object wrapped by *this. For allocator‐aware TYPE, optionally specify an alloc (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used.

Copy construct from the specified original wrapper using `TYPE`s copy constructor.

Move construct from the specified original wrapper using TYPE`s move constructor. Note that this move constructor is unconditionally `noexcept, as that is the entire purpose of this wrapper.

Wrap the specified val, using `TYPE`s move constructor.

Wrap the specified val, using TYPE`s (possibly extended) copy constructor. For allocator‐aware `TYPE, optionally specify an alloc (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used.

NothrowMovableWrapper(TYPE const& val);

Same as the preceding constructor, using the specified alloc to supply memory.

NothrowMovableWrapper(
    std::allocator_arg_t,
    allocator_type const& alloc);

Move construct from the specified original wrapper using TYPE`s extended move constructor. Use the specified `alloc (e.g., the address of a bslma::Allocator object) to supply memory. Note that this constructor will not be selected by overload resolution unless TYPE is allocator aware.

NothrowMovableWrapper(
    std::allocator_arg_t,
    allocator_type const& alloc,
    bslmf::MovableRef<NothrowMovableWrapper> original);

Wrap the specified val, using TYPE`s extended move constructor. Use the specified `alloc (e.g., the address of a bslma::Allocator object) to supply memory. Note that this constructor will not be selected by overload resolution unless TYPE is allocator aware.

NothrowMovableWrapper(
    std::allocator_arg_t,
    allocator_type const& alloc,
    bslmf::MovableRef<TYPE> val);

Copy construct from the specified original wrapper using TYPE`s extended copy constructor. Use the specified `alloc (e.g., the address of a bslma::Allocator object) to supply memory. Note that this constructor will not be selected by overload resolution unless TYPE is allocator aware.

NothrowMovableWrapper(
    std::allocator_arg_t,
    allocator_type const& alloc,
    NothrowMovableWrapper const& original);

Same as the preceding constructor, using the specified alloc to supply memory.

NothrowMovableWrapper(
    std::allocator_arg_t,
    allocator_type const& alloc,
    TYPE const& val);

Created with MrDocs