On Tuesday, 1 September 2020 10:41:33 PDT Giuseppe D'Angelo via Development wrote: > 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?
I hope you are. Calling begin() on a container that is already detached() shouldn't cause it to reallocate if it was already unshared. Calling prepend() or append() might. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel DPG Cloud Engineering _______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
