[#BloombergLP-bsltf-StdStatefulAllocator-max_size] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::xref:BloombergLP/bsltf/StdStatefulAllocator.adoc[StdStatefulAllocator]::max_size :relfileprefix: ../../../ :mrdocs: Return the maximum number of elements of type `TYPE` that can be allocated using this allocator in a single call to the `allocate` method. Note that there is no guarantee that attempts at allocating less elements than the value returned by `max_size` will not throw. *** DO NOT RELY ON THE CONTINUING PRESENT OF THIS METHOD *** THIS METHOD WILL BE REMOVED ONCE `bslstl::allocator_traits` PROPERLY DEDUCES AN IMPLEMENTATION FOR THIS FUNCTION WHEN NOT SUPPLIED BY THE ALLOCATOR DIRECTLY. == Synopsis Declared in `<bsltf_stdstatefulallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bsltf/StdStatefulAllocator/size_type.adoc[StdStatefulAllocator<TYPE, PROPAGATE_ON_CONTAINER_COPY_CONSTRUCTION, PROPAGATE_ON_CONTAINER_COPY_ASSIGNMENT, PROPAGATE_ON_CONTAINER_SWAP, PROPAGATE_ON_CONTAINER_MOVE_ASSIGNMENT, IS_ALWAYS_EQUAL>::size_type] max_size() const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#