Fraser Ross
unread,Jul 26, 2015, 11:26:19 AM7/26/15You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have copied this from a books eratta list. Should the code with
operator= not be (i1.operator=(i2)).operator=(i3); ?
int i1,i2,i3;
It turns out that "(i1 = i2) = i3;" yields undefined results when i1,
i2, and i3 are ints, because i1 is modified more than once without an
intervening sequence point. This is not a problem for user-defined
types, because for such types, the above is be equal to
i1.operator=(i2.operator=(i3)); and that's fine, because there's a
sequence point before and after each function call.
Fraser.