I faced the following problem: when I try to save a Cyrillic character in the char16_t
variable, I get a c2015 error (too many characters in constant). The most interesting thing is that it happens only when I build with MSVC via cmake. If I do it directly through studio, or build with cmake with another compiler, it's ok. Moreover, in the same case, which does not work with MSVC, it is possible to save Cyrillic characters in wchar_t
. I use version 16 of MSVC generator to generate it.
Example of broken code:
char16_t val = u'б';
EDIT: It is trouble with utf literals. I`m use this: char16_t val = some_int_val And this work correctly. Also, IDE correctly print int value of literal, but on the compile all crushs.