On Monday, 27 February 2023 16:22:46 PST Hamish Moffatt via Interest wrote:
> How and when would Qt5 show an error? We have the above code working and
> in production, and I'm able resize, copy and change, force a detach -
> operations where QVector would need to copy elements.

Ah, looks like it isn't going to. I expected the issue was that it didn't 
happen in this test case because it never detached. If you're definitely 
detaching, then this isn't the same issue.

The issue here is that you have a type that is copy/move constructible, but 
cannot be copy/move assigned. That's usually a bad combination; the new QList/
QVector code uses move-assignment when moving elements in the overlapping part 
of the list.

We could determine that your type is not move-assignable and use a different 
strategy, but this isn't implemented right now. It might be less efficient; I 
wouldn't know.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to