Otherwise, if this is a variable value, the function returns 0.
Alternatively, if the encoding of an external sequence is state-dependent, the function returns -1.
During its operation, this function simply calls the virtual protected member codecvt::do_encoding, which is the member function in charge of performing the actions described above.
Parameters
noneReturn value
One of the following, describing how external characters are encoded:| value | interpretation |
|---|---|
| -1 | Encoding is state-dependent |
| 0 | Characters have a variable width |
| other values | Fixed amount of external characters equivalent to one internal character |
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Possible output:
Characteristics of codecvt<wchar_t,char,mbstate_t>: Encoding: 1 Always noconv: 0 Max length: 5 |
See also
| codecvt::length | Return length of translated sequence (public member function) |
| codecvt::max_length | Return max length of one character (public member function) |
| codecvt::do_encoding | Return encoding width [virtual] (virtual protected member function) |
