[#BloombergLP-bsltf-AllocArgumentType] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::AllocArgumentType :relfileprefix: ../../ :mrdocs: Allocator‐aware integer wrapper uniquely typed for each template value `N`. == Synopsis Declared in `<bsltf_allocargumenttype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<int N> class AllocArgumentType; ---- == Description 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. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/AllocArgumentType/2constructor-03.adoc[`AllocArgumentType`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsltf/AllocArgumentType/2destructor.adoc[`~AllocArgumentType`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bsltf/AllocArgumentType/operator_assign-01.adoc[`operator=`] | Assign to this object the value of the specified `rhs` object. | xref:BloombergLP/bsltf/AllocArgumentType/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/bsltf/AllocArgumentType/movedFrom.adoc[`movedFrom`] | Return the move state of this object as source of a move operation. | xref:BloombergLP/bsltf/AllocArgumentType/movedInto.adoc[`movedInto`] | Return the move state of this object as target of a move operation. | xref:BloombergLP/bsltf/AllocArgumentType/2conversion.adoc[`operator int`] | Return the value of this test argument object. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/getMovedFrom-00.adoc[`getMovedFrom`] | Return the move‐from state of the specified `object`. | xref:BloombergLP/bsltf/getMovedInto-0a.adoc[`getMovedInto`] | Return the move‐into state of the specified `object`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#