Allocator-aware integer wrapper uniquely typed for each template value N.
Declared in <bsltf_allocargumenttype.h>
template<int N>
class AllocArgumentType;
This class template declares a separate type for each template parameter value N, bsltf::AllocArgumentType<N>, that wraps an integer value and provides implicit conversion to and from int. The wrapped integer will be dynamically allocated using the supplied allocator, or the default allocator if none is supplied. Its main purpose is that having separate types for testing enables distinguishing them when calling through a function template interface, thereby avoiding ambiguities or accidental switching of arguments in the implementation of in-place constructors. It further tests that allocators are propagated correctly, or not, as required.
| Name | Description |
|---|---|
AllocArgumentType [constructor] | Constructors |
~AllocArgumentType [destructor] | Destroy this object. |
operator= | Assign to this object the value of the specified rhs object. |
allocator | Return the allocator used by this object to supply memory. |
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. |
operator int | Return the value of this test argument object. |
| Name | Description |
|---|---|
getMovedFrom | Return the move-from state of the specified object. |
getMovedInto | Return the move-into state of the specified object. |