https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104640
Bug ID: 104640 Summary: incomplete unicode support for User-defined literals Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: maik.urbannek at cattatech dot de Target Milestone: --- ``` int operator""_π(const unsigned long long i){return (static_cast<int>(i));} template <char...> double operator "" _π(){return 12.0;} int main() { const double d=0.0_π; return 234_π+static_cast<int>(d); } ``` In my opinion this should work (clang compiles it). gcc produces the following error: ``` error: expected initializer before '\U000003c0' 1 | int operator""_π(const unsigned long long i){return (static_cast<int>(i));} | ^ Compiler returned: 1 ``` Gcc(since gcc10) can compile the second operator (line 3), but not the first (line 1).