enum codecvt_mode {
  consume_header = 4,
  generate_header = 2,
  little_endian = 1
Codecvt mode
Enum type that specifies endianness options as a bitmask for the following class templates: codecvt_utf8, codecvt_utf16 or codecvt_utf8_utf16.

consume_header4An optional initial header sequence (BOM) is read to determine whether a multibyte sequence converted in is big-endian or little-endian.
generate_header2An initial header sequence (BOM) shall be generated to indicate whether a multibyte sequence converted out is big-endian or little-endian.
little_endian1The multibyte sequence generated on conversions out shall be little-endian (as opposed to the default big-endian).

This is a bitmask type: each of the labels is considered a flag that can be individually set or not in a particular value of this type (this can be achieved by combining the flags using bitwise OR operations). Therfore, 0 is also a valid value that represents the absence of all flags.