[Development] QList
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Mon Apr 3 10:40:38 CEST 2017
Il 03/04/2017 04:59, Thiago Macieira ha scritto:
>> 2) Suppose we add right now a match(QStringView) overload, should it
>> still return a QRegularExpressionMatch or a new class with similar API?
>> If it still returns a QREM, what would QREM::capturedRef(N) then return
>> for a match over a string view?
> Anything that takes a QStringView and needs to store should store a QString,
> not a QStringView. So if it needs to make a copy, so be it.
If that's the intention, I'd rather not add a match(QStringView)
overload at all and move the burden of taking a copy to the user, so at
least it's evident that there's a deep copy happening there.
Cheers,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4007 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170403/997e5b6f/attachment.bin>
More information about the Development
mailing list