[#BloombergLP-bsltf-CopyMoveTracker] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::CopyMoveTracker :relfileprefix: ../../ :mrdocs: Type that tracks whether it has been copied into, moved into, or moved from. == Synopsis Declared in `<bsltf_copymovetracker.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class CopyMoveTracker; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/CopyMoveTracker/2constructor-03.adoc[`CopyMoveTracker`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsltf/CopyMoveTracker/operator_assign-03.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bsltf/CopyMoveTracker/copyMoveState.adoc[`copyMoveState`] | Return this object's state. | xref:BloombergLP/bsltf/CopyMoveTracker/hasUnknownCopyMoveState.adoc[`hasUnknownCopyMoveState`] | Return `true` if this object's state includes the `e_UNKNOWN` bit. This attribute can be `true` only if `setCopyMoveState` was called with an enumerator value that includes the `e_UNKNOWN` bit. | xref:BloombergLP/bsltf/CopyMoveTracker/isCopiedConstInto.adoc[`isCopiedConstInto`] | Return `true` if this object's state includes the `e_COPIED_CONST_INTO` bits but not `e_UNKNOWN`. This attribute is `true` if this object was copy constructed or copy assigned from a `const` lvalue (or, in C++03, from a prvalue). | xref:BloombergLP/bsltf/CopyMoveTracker/isCopiedInto.adoc[`isCopiedInto`] | Return `true` if this object's state includes the `e_COPIED_INTO` bit but not `e_UNKNOWN`. This attribute is `true` if either `isCopiedConstInto()` or `isCopiedNonconstInto()` is true. | xref:BloombergLP/bsltf/CopyMoveTracker/isCopiedNonconstInto.adoc[`isCopiedNonconstInto`] | Return `true` if this object's state includes the `e_COPIED_NONCONST_INTO` bits but not `e_UNKNOWN`. This attribute is `true` if this object was copy constructed or copy assigned from a non‐`const` lvalue. | xref:BloombergLP/bsltf/CopyMoveTracker/isMovedFrom.adoc[`isMovedFrom`] | Return `true` if this object's state includes the `e_MOVED_FROM` bit but not `e_UNKNOWN`. This attribute is `true` if this object was the argument of the move constructor or the rhs of the move assignment operator and was not subsequently modified. | xref:BloombergLP/bsltf/CopyMoveTracker/isMovedInto.adoc[`isMovedInto`] | Return `true` if this object's state includes the `e_MOVED_INTO` bit but not `e_UNKNOWN`. This attribute is `true` if this object was move constructed or was the lhs the of move assignment operator. | xref:BloombergLP/bsltf/CopyMoveTracker/isOriginal.adoc[`isOriginal`] | Return `true` if this object is not in a copied‐into, moved‐into, or unknown state. This attribute is `true` if this object was default constructed or reset and not subsequently assigned to. | xref:BloombergLP/bsltf/CopyMoveTracker/resetCopyMoveState.adoc[`resetCopyMoveState`] | Set this object to the `e_NOT_COPIED_OR_MOVE` state. | xref:BloombergLP/bsltf/CopyMoveTracker/setCopyMoveState.adoc[`setCopyMoveState`] | Set this object to the specified `state`, which might be the bitwise OR of `e_MOVED_FROM` and one of the other enumerator values. The behavior is undefined unless `CopyMoveState::isValid(state)` is `true`. | xref:BloombergLP/bsltf/CopyMoveTracker/swapCopyMoveStates.adoc[`swapCopyMoveStates`] | Set the state of both the specified `this` and `b` objects to the bitwise OR of `e_MOVED_INTO` and `e_MOVED_FROM`. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bsltf/setCopyMoveState-0e.adoc[BloombergLP::bsltf::setCopyMoveState]` | Set the object at the specified `tracker` address to the specified `state`. This function is an ADL customization point used by `CopyMoveState::set(obj, state)`. The behavior is undefined unless `CopyMoveState::isValid(state)` is `true`. | `xref:BloombergLP/bsltf/copyMoveState-00.adoc[BloombergLP::bsltf::copyMoveState]` | Return the state of the specified `tracker`. This function is an ADL customization point used by `CopyMoveState::get(obj)`. | `xref:BloombergLP/bsltf/operator_not_eq-0f0.adoc[BloombergLP::bsltf::operator!=]` | Return `false`; the copy/move state is _not_ a salient attribute, so all `CopyMoveTracker` objects compare equal. Note that this operator is called implicitly if a client class defines a defaulted comparison operator (C++20), but will not be selected by overload resolution for a derived class having no comparison operator. | `xref:BloombergLP/bsltf/operator_eq-0844.adoc[BloombergLP::bsltf::operator==]` | Return `true`; the copy/move state is _not_ a salient attribute, so all `CopyMoveTracker` objects compare equal. Note that this operator is called implicitly if a client class defines a defaulted comparison operator (C++20), but will not be selected by overload resolution for a derived class having no comparison operator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#