Compartilhar via


codecvt::do_encoding

A virtual function that tests if the encoding of the Byte stream is state dependent, whether the ratio between the Bytes used and the CharTypes produced is constant and, if so, determines the value of that ratio.

virtual int do_encoding( ) const throw( );

Return Value

The protected virtual member function returns:

  • –1, if the encoding of sequences of type extern_type is state dependent.

  • 0, if the encoding involves sequences of varying lengths.

  • N, if the encoding involves only sequences of length N

Example

See the example for encoding, which calls do_encoding.

Requirements

Header: <locale>

Namespace: std

See Also

Reference

codecvt Class