|
string::max_sizepublic member function
<string>
[C++98] size_t max_size() const; [C++11] size_t max_size() const noexcept; Return maximum size of string This is the maximum potential length the string can reach due to known system or library implementation limitations, but the object is not guaranteed to be able to reach that length: it can still fail to allocate storage at any point before that length is reached. ParametersnoneReturn ValueThe maximum length the string can reach.size_t is an unsigned integral type. Example
A possible output for this program could be:
Complexity
<case label="C++98">
Unspecified, but generally constant. </case> <case label="C++11"> Constant. </case> /div> Iterator validityNo changes.Data racesThe object is accessed.Exception safetyNo-throw guarantee: this member function never throws exceptions.See also
|