Namespace for enumerators and helpers describing copy/move history of test objects.

Synopsis

Declared in <bsltf_copymovestate.h>

struct CopyMoveState;

Enums

Name

Description

Enum

Enumeration of copy/move state bit flags for test types.

Static Member Functions

Name

Description

get

For the specified obj return copyMoveState(obj). Note that getCopyMoveState is an ADL customization point; if not customized for a specific TYPE, a default implementation returning e_UNKNOWN is invoked.

isCopiedConstInto

Return true if, for the specified v, CopyMoveState::get(v) includes the e_COPIED_CONST_INTO bits but not e_UNKNOWN.

isCopiedInto

Return true if, for the specified v, CopyMoveState::get(v) includes the e_COPIED_INTO bit but not e_UNKNOWN; otherwise return false.

isCopiedNonconstInto

Return true if, for the specified v, CopyMoveState::get(v) includes the e_COPIED_NONCONST_INTO bits but not e_UNKNOWN.

isMovedFrom

Return true if, for the specified v, CopyMoveState::get(v) includes the e_MOVED_FROM bit but not e_UNKNOWN; otherwise return false.

isMovedInto

Return true if, for the specified v, CopyMoveState::get(v) includes the e_MOVED_INTO bit but not e_UNKNOWN; otherwise return false.

isOriginal

Return true if, for the specified v, CopyMoveState::get(v) does not include any of the e_COPIED_INTO, e_MOVED_INTO, or e_UNKNOWN bits; otherwise return 'false. Note that this function's return value is unaffected by the e_MOVED_FROM bit.

isUnknown

Return true if, for the specified v, CopyMoveState::get(v) includes the e_UNKNOWN bit; otherwise return 'false.

isValid

Return true if the specified val is a valid value of Enum; otherwise false. A valid value is any of the enumerators or the bitwise OR of any of the enumerators except e_UNKNOWN with e_MOVED_FROM.

set

For the specified obj_p address and specified state, invoke setCopyMoveState(obj_p, state). Note that setCopyMoveState is an ADL customization point; if not customized for a specific TYPE, a no‐op default implementation is invoked.

toAscii

Return the non‐modifiable string representation corresponding to the specified enumeration value, if it exists, and a unique (error) string otherwise. The string representation of value matches its corresponding enumerator name with the "e_" prefix elided. For example: ` bsl::cout << CopyMoveState::toAscii(CopyMoveState::e_COPIED_INTO); ` will print the following on standard output: ` COPIED_INTO ` Any of the *_INTO enums can be bitwise ORed with e_MOVED_FROM, in which case the resulting string will be a comma‐separated list of two names, e.g., "COPIED_CONST_INTO, MOVED_FROM". Note that specifying a value that does not match any valid combination of enumerators will result in a string representation that is distinct from any of those corresponding to the enumerators, but is otherwise unspecified.

Created with MrDocs