Il 01/09/20 19:33, Thiago Macieira ha scritto:
All non-const functions that may detach should be coded so they DO detach. That is, after any and all non-const functions, the refcount of the container should be 1.
This is the contract, and it's OK. I don't think however that this is what was intended by OP. Rather, that calling a non-const function may repack/reallocate a QCC (*), causing invalidation of all references and iterators, even if the container was NOT shared in the first place.
Did I misunderstand the problem? (*) Qt Contiguous Container Thanks, -- Giuseppe D'Angelo | [email protected] | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
