[Development] HEADS-UP: QStringLiteral

Matthew Woehlke mwoehlke.floss at gmail.com
Thu Aug 22 23:41:51 CEST 2019


On 22/08/2019 17.00, Thiago Macieira wrote:
> For Qt 6, it is possible (and is still my goal[*]) to make creating a
> QString out of a QStringView and through it from a u"" literal happen
> in constant time, inlined, with no memory allocation.
How? Unless I miss something (which your example did not show),
QStringView doesn't know if the memory to which it points is rodata or
something else. If it's something else, you can't just stick it in a
QString and hope for the best, because it could change or cease to be
allocated at any time.

-- 
Matthew



More information about the Development mailing list