[Interest] use of deleted function errors in QList / qarraydataops.h

Thiago Macieira thiago.macieira at intel.com
Tue Feb 28 01:49:16 CET 2023

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230227/9acbd481/attachment.bin>

More information about the Interest mailing list