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. The class uses a bslma::Allocator to allocate memory and defines the type trait bslma::UsesBslmaAllocator. 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.
Declared in <bsltf_movablealloctesttype.h>
class MovableAllocTestType;
| Name | Description |
|---|---|
MovableAllocTestType [constructor] | Constructors |
~MovableAllocTestType [destructor] | Destroy this object. |
operator= | Assignment operators |
allocator | Return the allocator used by this object to supply memory. |
copyMoveState | Return the copy/move state of this object. |
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. |
setCopyMoveState | Set the copy/move state of this object to the specified state. |
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. |
| Name | Description |
|---|---|
BloombergLP::bsltf::setCopyMoveState | Set the copy/move state of object at the specified obj address to the specified state. This function is an ADL customization point used by CopyMoveState::set(obj, state). |
BloombergLP::bsltf::copyMoveState | Return the copy/move state of the specified obj. This function is an ADL customization point used by CopyMoveState::get(obj). |
| Name | Description |
|---|---|
debugprint | Same as the preceding overload for this test type. |
operator!= | Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two MovableAllocTestType 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 value, and false otherwise. Two MovableAllocTestType objects have the same 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. |