> -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Friday, 10 July 2015 12:22 PM > To: Curtis Mitch; Smith Martin; [email protected] > Subject: Re: [Development] HEADS UP: Don't use QList, use > Q_DECLARE_TYPEINFO > > 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
Ah, I see. Thank you. _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
