[#BloombergLP-bsltf-StdStatefulAllocator-max_size]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::xref:BloombergLP/bsltf/StdStatefulAllocator.adoc[StdStatefulAllocator]::max&lowbar;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&period; Note that there is no guarantee that attempts at allocating less elements than the value returned by `max&lowbar;size` will not throw&period; &ast;&ast;&ast; DO NOT RELY ON THE CONTINUING PRESENT OF THIS METHOD &ast;&ast;&ast; THIS METHOD WILL BE REMOVED ONCE `bslstl&colon;&colon;allocator&lowbar;traits` PROPERLY DEDUCES AN IMPLEMENTATION FOR THIS FUNCTION WHEN NOT SUPPLIED BY THE ALLOCATOR DIRECTLY&period;

== Synopsis

Declared in `&lt;bsltf&lowbar;stdstatefulallocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bsltf/StdStatefulAllocator/size_type.adoc[StdStatefulAllocator&lt;TYPE, PROPAGATE&lowbar;ON&lowbar;CONTAINER&lowbar;COPY&lowbar;CONSTRUCTION, PROPAGATE&lowbar;ON&lowbar;CONTAINER&lowbar;COPY&lowbar;ASSIGNMENT, PROPAGATE&lowbar;ON&lowbar;CONTAINER&lowbar;SWAP, PROPAGATE&lowbar;ON&lowbar;CONTAINER&lowbar;MOVE&lowbar;ASSIGNMENT, IS&lowbar;ALWAYS&lowbar;EQUAL&gt;::size&lowbar;type]
max&lowbar;size() const;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
