Walter Bright wrote:
> Steven Schveighoffer wrote:
>> The example that I gave does not seem to you like it would surprise
>> someone?  I passed in a const object and it got modified, even though
>> no casts were used.
> 
> No, it doesn't surprise me. Const on one object does not apply to
> another object.

const C c = C.theCommonOne;
auto old = c.x;
c.foo();
assert (old == c.x); // Fails and this does not surprise you?

                Jerome
-- 
mailto:jeber...@free.fr
http://jeberger.free.fr
Jabber: jeber...@jabber.fr

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to