BloombergLP::bsltf::MovableTestType

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.

Synopsis

Declared in <bsltf_movabletesttype.h>

class MovableTestType;

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 objects do not have the same data() value, and false otherwise. Two MovableTestType objects do not have the same value if their data attributes are not the same.
operator==Return true if the specified lhs and rhs objects have the same data() value, and false otherwise. Two MovableTestType objects have the same value if their data attributes are the same. TBD: think about the behavior when specified on an object that was moved-from on this as well as other functions/methods if appropriate.
setMovedIntoSet the moved-into state of the specified object to the specified value.