fixstr::basic_fixed_string::max_size
#1 |
|
Returns the maximum number of elements the fixed string is able to hold due to system or library implementation limitations, i.e. std::distance(begin(), end())
for the largest fixed string.
note
Because each fixstr::basic_fixed_string<TChar, N, TTraits>
is a fixed-size container, the value returned by max_size
equals N
(which is also the value returned by size
);
#
Parameters(none)
#
Return valueMaximum number of characters.
#
ComplexityConstant.
#
Example#include <fixed_string.hpp>#include <iostream>
int main(){ fixstr::fixed_string s = "Hello, world!"; std::cout << "Maximum size of the 'fixed_string' is " << s.max_size() << "\n";}
Maximum size of the 'fixed_string' is 13