char16_t

From Just Solve the File Format Problem
Revision as of 06:58, 13 May 2015 by VolodyA! V Anarhist (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
File Format
Name char16_t
Ontology
Released 2011


C++ char16_t is guaranteed to never use less bits than char and to be no less than 16 bits wide. This means that it can successfully store any UCS-2 character value.

Character literal must use single quotes preceding with the letter u. It is also possible to use octal or hexadecimal representation to produce literals. Here is an example;

char16_t c1 = u'ё';
char16_t = u'ab';
char16_t = u'\123';
char16_t = u'\xA9';

char16_t is considered to be enumerable (thus you can use characters in constructs like switch).

Other C++ data types storing symbols

  • char no less than 8 bits, one byte.
  • char32_t no less than 32 bits, no less than char16_t
  • wchar_t whatever the largest block of addressable memory happens to be on the system
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox