[#BloombergLP-bsltf-MovableAllocTestType] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::MovableAllocTestType :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<bsltf_movablealloctesttype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MovableAllocTestType; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/MovableAllocTestType/2constructor-0e.adoc[`MovableAllocTestType`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsltf/MovableAllocTestType/2destructor.adoc[`~MovableAllocTestType`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bsltf/MovableAllocTestType/operator_assign-06.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bsltf/MovableAllocTestType/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/bsltf/MovableAllocTestType/copyMoveState.adoc[`copyMoveState`] | Return the copy/move state of this object. | xref:BloombergLP/bsltf/MovableAllocTestType/data.adoc[`data`] | Return the value of the `data` attribute of this object. | xref:BloombergLP/bsltf/MovableAllocTestType/movedFrom.adoc[`movedFrom`] | Return the move state of this object as source of a move operation. | xref:BloombergLP/bsltf/MovableAllocTestType/movedInto.adoc[`movedInto`] | Return the move state of this object as target of a move operation. | xref:BloombergLP/bsltf/MovableAllocTestType/setCopyMoveState.adoc[`setCopyMoveState`] | Set the copy/move state of this object to the specified `state`. | xref:BloombergLP/bsltf/MovableAllocTestType/setData.adoc[`setData`] | Set the `data` attribute of this object to the specified `value`. | xref:BloombergLP/bsltf/MovableAllocTestType/setMovedInto.adoc[`setMovedInto`] | Set the moved‐into state of this object to the specified `value`. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bsltf/setCopyMoveState-05.adoc[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)`. | `xref:BloombergLP/bsltf/copyMoveState-01.adoc[BloombergLP::bsltf::copyMoveState]` | Return the copy/move state of the specified `obj`. This function is an ADL customization point used by `CopyMoveState::get(obj)`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/debugprint-0cb.adoc[`debugprint`] | Same as the preceding overload for this test type. | xref:BloombergLP/bsltf/operator_not_eq-0bc.adoc[`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. | xref:BloombergLP/bsltf/operator_eq-007.adoc[`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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#