#include <bsltf_wellbehavedmoveonlyalloctesttype.h>
This unconstrained (value-semantic) attribute class that uses a bslma::Allocator to supply memory and defines the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates by defining a simple type representative of user-defined types having an allocator. See the Attributes section for information on the class attributes.
See bsltf_wellbehavedmoveonlyalloctesttype
◆ WellBehavedMoveOnlyAllocTestType() [1/4]
| bsltf::WellBehavedMoveOnlyAllocTestType::WellBehavedMoveOnlyAllocTestType |
( |
bslma::Allocator * |
basicAllocator = 0 | ) |
|
|
explicit |
Create a WellBehavedMoveOnlyAllocTestType object having the (default) attribute values:
int data() const
Return the value of the data attribute of this object.
Definition bsltf_wellbehavedmoveonlyalloctesttype.h:296
Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.
◆ WellBehavedMoveOnlyAllocTestType() [2/4]
| bsltf::WellBehavedMoveOnlyAllocTestType::WellBehavedMoveOnlyAllocTestType |
( |
int |
data, |
|
|
bslma::Allocator * |
basicAllocator = 0 |
|
) |
| |
|
explicit |
Create a WellBehavedMoveOnlyAllocTestType object having the specified data attribute value. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.
◆ WellBehavedMoveOnlyAllocTestType() [3/4]
◆ WellBehavedMoveOnlyAllocTestType() [4/4]
Create a WellBehavedMoveAllocTestType object having the same value as the specified original object. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. After construction, this object will be in a movedInto state, and original will be in a movedFrom state. No allocations shall occur (so no exception will be thrown) unless 'basicAllocator != original.allocator()).
◆ ~WellBehavedMoveOnlyAllocTestType()
| bsltf::WellBehavedMoveOnlyAllocTestType::~WellBehavedMoveOnlyAllocTestType |
( |
| ) |
|
◆ allocator()
◆ data()
| int bsltf::WellBehavedMoveOnlyAllocTestType::data |
( |
| ) |
const |
|
inline |
◆ movedFrom()
| MoveState::Enum bsltf::WellBehavedMoveOnlyAllocTestType::movedFrom |
( |
| ) |
const |
|
inline |
◆ movedInto()
| MoveState::Enum bsltf::WellBehavedMoveOnlyAllocTestType::movedInto |
( |
| ) |
const |
|
inline |
◆ operator=()
Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object. If rhs is a reference to this object, there are no other effects; otherwise, the object referenced by rhs will be reset to a default constructed state, rhs shall be in a movedFrom state, and this object will be in a movedTo state. No allocations shall occur (so no exception will be thrown) unless this object and rhs have different allocators. Note that the moved-from state is specified, rather than "valid but unspecified", as this type is intended for verifying test drivers that want to ensure that moves occur correctly where expected.
◆ setData()
| void bsltf::WellBehavedMoveOnlyAllocTestType::setData |
( |
int |
value | ) |
|
◆ setMovedInto()
| void bsltf::WellBehavedMoveOnlyAllocTestType::setMovedInto |
( |
MoveState::Enum |
value | ) |
|
|
inline |
The documentation for this class was generated from the following file: