BloombergLP::bsltf::WellBehavedMoveOnlyAllocTestType

Move-only allocating test type that records well-behaved move state.

Synopsis

Declared in <bsltf_wellbehavedmoveonlyalloctesttype.h>

class WellBehavedMoveOnlyAllocTestType;

Description

This unconstrained (value-semantic) attribute class that uses a bslma::Allocator to supply memory and defines the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates by defining a simple type representative of user-defined types having an allocator. See the section for information on the class attributes.

Member Functions

NameDescription
WellBehavedMoveOnlyAllocTestType [constructor]Constructors
~WellBehavedMoveOnlyAllocTestType [destructor]Destroy this object.
operator= Assign to this object the value of the specified rhs object.
allocator Return the allocator used by this object to supply memory.
data Return the value of the data attribute of this object.
movedFrom Return the move state of this object as source of a move operation.
movedInto Return the move state of this object as target of a move operation.
setData Set the data attribute of this object to the specified value.
setMovedInto Set the moved-into state of this object to the specified value.

Non-Member Functions

NameDescription
debugprintSame as the preceding overload for this test type.
getMovedFromReturn the move-from state of the specified object.
getMovedIntoReturn the move-into state of the specified object.
operator!=Return true if the specified lhs and rhs objects do not have the same value, and false otherwise.
operator==Return true if the specified lhs and rhs objects have the same value, and false otherwise.
setMovedIntoSet the moved-into state of the specified object to the specified value.
swapExchange the states of the specified a and b.