[Development] HEADS-UP: QStringLiteral

Matthew Woehlke mwoehlke.floss at gmail.com
Thu Aug 22 23:01:50 CEST 2019


On 22/08/2019 15.09, Danila Malyutin wrote:
> Can't it be alleviated/improved by providing user-defined literal for
> QString(Literal)? So that one would only write   a["b"_qs] = "c"_qs.

No; there is no (portable) way in C++17 (and I think still in C++20) for
a UDL's return type to depend on the size (string length) of its input,
which is required to implement QString literals. (I've tried...)

-- 
Matthew



More information about the Development mailing list