BloombergLP::bsltf::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.

Synopsis

Declared in <bsltf_allocargumenttype.h>

template<int N>
class AllocArgumentType;

Member Functions

NameDescription
AllocArgumentType [constructor]Constructors
~AllocArgumentType [destructor]Destroy this object.
operator= Assignment operators
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.

Non-Member Functions

NameDescription
getMovedFromReturn the move-from state of the specified object.
getMovedIntoReturn the move-into state of the specified object.