The code below:
#include <sstream>
int main()
{
std::istringstream iss{"\x{01}"};
}
Compiles fine with CLang and GCC and doesn't compile with MSVC (see the demo).
What this syntax means for the first two compilers (can't find in the standard) and why it doesn't work for the recent version of MSVC?
It is defined in [lex.ccon] as a character literal:
The following is taken from C++23 draft N4928, which looks a bit different than the current definition on eel.is:
hexadecimal-escape-sequence:
\x hexadecimal-digit
hexadecimal-escape-sequence hexadecimal-digit
\x{ simple-hexadecimal-digit-sequence }
The new version (on eel.is) seems more appropriate, so this was probably a fix.
As for MSVC, it does not support this as of the day of the question (2024-10-09). Do a browser text search for the term "Delimited escape sequences".