BloombergLP::bsltf::MovableTestType

Non-allocating test type that records when move semantics are used.

Synopsis

Declared in <bsltf_movabletesttype.h>

class MovableTestType;

Description

This class provides an unconstrained (value-semantic) attribute type that records when move semantics have been invoked with the object instance as the source parameter. This class is primarily provided to facilitate testing of templates where move semantics need to be differentiated versus copy semantics. See the Attributes section under DESCRIPTION in the component-level documentation for information on the class attributes.

Member Functions

NameDescription
MovableTestType [constructor]Constructors
~MovableTestType [destructor]Destroy this object.
operator= Assignment operators
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 do not have the same value.
operator==Return true if the specified lhs and rhs have the same value.
setMovedIntoSet the moved-into state of the specified object to the specified value.