elements icon indicating copy to clipboard operation
elements copied to clipboard

The C++20 break u8 string literal compatibility bug

Open uikino opened this issue 3 years ago • 3 comments

Bug

The C++20 P1423R2 paper make compiler compile error if source code using u8"..." string literal with -std=c++20

Suggestion

remove all u8 string literal prefix

uikino avatar Mar 21 '22 03:03 uikino

Yes, this is a known issue. I'm not happy with suggestions yet that will satisfy both c++17 and c++20.

djowel avatar Mar 21 '22 03:03 djowel

I am OK with this solution: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r2.html#emulate Are you willing to prepare a PR?

djowel avatar Mar 21 '22 03:03 djowel

I work with Linux and do not have MSVC installed, so the solution provided in the PR can only be described as initially verified on GCC for Linux.

uikino avatar Apr 11 '22 02:04 uikino