[#bsl-basic_string-01d-max_size]
= xref:bsl.adoc[bsl]::xref:bsl/basic_string-01d.adoc[basic&lowbar;string&lt;char8&lowbar;t&gt;]::max&lowbar;size
:relfileprefix: ../../
:mrdocs:

Return the maximal possible length of this string&period; Note that requests to create a string longer than this number of characters are guaranteed to raise a `length&lowbar;error` exception&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;string&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-01d/size_type.adoc[size&lowbar;type]
max&lowbar;size() const noexcept;
----


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