std::codecvt<InternT,ExternT,State>::max_length,do_max_length (3) - Linux Manuals
std::codecvt<InternT,ExternT,State>::max_length,do_max_length: std::codecvt<InternT,ExternT,State>::max_length,do_max_length
NAME
std::codecvt<InternT,ExternT,State>::max_length,do_max_length - std::codecvt<InternT,ExternT,State>::max_length,do_max_length
Synopsis
Defined in header <locale>
public: (1)
int max_length() const;
protected: (2)
virtual int do_max_length() const;
1) Public member function, calls the member function do_max_length of the most derived class.
2) Returns the maximum value that do_length(state, from, from_end, 1) can return for any valid range [from, from_end) and any valid state.
Return value
The maximum number of ExternT characters that could be consumed if converted by in() to produce one InternT character.
The non-converting specialization std::codecvt<char, char, std::mbstate_t> returns 1
Notes
If the encoding is state-dependent (encoding() == -1), then more than max_length() external characters may be consumed to produce one internal character
Exceptions
(none) (until C++11)
noexcept specification: (since C++11)
noexcept
Example
// Run this code
Output:
See also