Name

codecvt_base class — Base class for the codecvt template

Synopsis

class codecvt_base {
public:
  enum result { ok, partial, error, noconv };
};

The codecvt_base class is the base class for the codecvt and codecvt_byname class templates. It declares the result type, which is the type returned by the do_in and do_out conversion functions. Table 13-19 lists the literals of the result enumerated type.

Table 13-19. codecvt_base::result literals

Literal

Description

error

Error in conversion (e.g., invalid state or multibyte character sequence)

noconv

No conversion (or unshift terminated) needed

ok

Conversion finished successfully

partial

Not all source characters converted, or unshift sequence is incomplete

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.