https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111164
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-08-27 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. using -std=c++20 produce a better error message too: <source>:4:9: error: no matching function for call to 'operator""_x<"abc">()' 4 | int x = "abc"_x; | ^~~~~~~ <source>:2:5: note: candidate: 'template<char ...<anonymous> > int operator""_x()' 2 | int operator ""_x (); | ^~~~~~~~ <source>:2:5: note: template argument deduction/substitution failed: <source>:4:9: error: '"abc"' is not a valid template argument for type 'char' because string literals can never be used in this context 4 | int x = "abc"_x; | ^~~~~~~