Il 10/07/2015 12:12, Curtis Mitch ha scritto:
How is it binary incompatible?

Because the code produced by QList<C> (which is inlined) is incompatible if C becomes a "good" type (from a "bad" one) or viceversa.

The code for a "bad" C involves allocating every C object on the heap, putting the pointer in the backing array, and dereferencing that pointer to get the C back; the code for a "good" C involves putting and retrieving C straight into/from the backing array.

What happens if you have a library which creates a QList<C> assuming C to be "bad", and then passes that QList<C> to your app, which assumes C to be "good"? This is what happens if you add a typeinfo after you forgot.

Cheers,
--
Giuseppe D'Angelo | [email protected] | Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts

Attachment: smime.p7s
Description: Firma crittografica S/MIME

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to