Yes,

in hindsight this doesn't scale and it was also totally backwards. The issue is 
that the char8_t overload introduces ambiguity in the overload set, so instead 
of adding more overloads we should just remove it unless it really matches. So 
just add an overload taking a generic T and SFINAE it out as needed by testing 
for std::is_same_v<T, const char8_t*

As you can see at https://godbolt.org/z/SMEeBC , this handles 0, NULL and 
nullptr just fine, as well as u8 string literals and normal string literals.

Though, if the compilers are implementing the behaviour correctly, maybe the 
right course of action is to actually complain to the committee that their 
change breaks code… 

Fabian

--
Fabian Kosmale
Software Engineer
The Qt Company GmbH
Erich-Thilo-Str. 10
D-12489 Berlin
[email protected]
+49 1638686070
http://qt.io

Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B
--
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to