According to ISO / IEC 14882: 2011 (ยง2.14.3), a character literal, also called constants, is illustrated below.
character-literal: ' c-char-sequence ' u' c-char-sequence ' U' c-char-sequence ' L' c-char-sequence ' ... c-char: any member of the source character set except the single-quote ', backslash \, or new-line character escape-sequence universal-character-name
At first glance, it seems that directly embedding in unicode instead of using a universal symbolic name in a symbolic literal is illegal. However, most compilers like g ++ and visual studio C ++ do not bother at all, which is somewhat confusing. Each implementation automatically converts these Unicode to the name of a universal character before starting compilation, regardless of the standard?
c ++ c ++ 11 unicode
user3647351
source share