I have been writing in C++ since 2010.
I’ve just accidentally inputted the “й“ letter in my code, hovered the mouse on it to remove it, and noticed that Visual Studio just says there is no variable “й“.
I wrote int й = 1; and it just compiled!
What did I miss?
It bet it’s probably features of C++11, C++14 or something like this.
Here's what The Standard says ([lex.phases]):
Physical source file characters are mapped, in an implementation-defined manner, to the basic source character set (introducing new-line characters for end-of-line indicators) if necessary. The set of physical source file characters accepted is implementation-defined.
So your particular implementation supports that, but it's not guaranteed to be portable to any other implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With