[Development] What's the status of a moved-from object?

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Mon May 20 11:25:10 CEST 2019


Hi,

Il 19/05/19 18:54, Thiago Macieira ha scritto:
> But I think all Qt classes should go beyond that, unless they have VERY good
> reasons not to do so (and document so). The moved-from object should also be
> in a valid state so all the accessor and mutation API in the class can operate
> in the object without ill effects. What they actually do, we can't tell, since
> the initial state is unknowable. So apply the principle of GIGO.

So basically the same stance as the Standard Library? One should be able 
to invoke any function without preconditions on a moved-from object?

Cheers,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190520/cd940701/attachment.bin>


More information about the Development mailing list