On Friday, 12 July 2019 12:27:58 -03 Matthew Woehlke wrote: > > And if we want to make use of the fact that a string > > is UTF-8, the templates won't work. > > Eh? char8_t is a detectable and distinct type. (Wasn't that the whole > point of this thread?) So is QUtf8String if such a thing were to come > into existence.
I didn't mean we can't write templates. I meant that at the end of the implementation, you've got two distinct functions: one for Latin1/US-ASCII* and one for UTF-8, whether you used templates or not. So the template didn't buy you much. [*] US-ASCII under "out of range characters are UB", which allows us to simply use Latin1. Or UTF-8. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel System Software Products _______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
