TITLE: New mutable keyword PROBLEM: jamesc@dev.state.com.au (James Cribb) In situations where you have a variable declared as const but need to change it (for some good reason of course), you can `cast away const'. RESPONSE: maxtal@physics.su.OZ.AU (John Max Skaller), 8 Aug 93 WARNING! This is not true anymore! For example: f(){ const int i=2; (int&)i = 1; // error }; [ This is actually accepted by the ObjectCenter compiler. -adc ] This is an error, and has been for some time. However f() { const complex c(1,1); (complex&)c = complex(2,2); // was OK, now not OK } This used to be fine because 'complex' has a constructor. Since Munich, this is an error. Violating the constness of a variable is now not allowed. The change came about with the introduction of 'mutable' members: class X { int i; mutable int j; }; const X x = {1,2}; x.j=3; // fine: mutable x.i=6; // error [...]