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.dang...@kdab.com | Senior Software Engineer KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development