   mutable syntax question (solved)
  How do I declare a mutable pointer to a const object in C++?gcc 4 seems to accept const Obj mutable *p; but gcc 3.3 sayssymbols.hpp:369: error: declaration does not declare anythingsymbols.hpp:369: error: syntax error before `mutable'[Edited by - 255 on December 2, 2005 12:55:21 PM]
  IIRC, const Obj* p;.  See this.   ;  const Obj * mutable p; does not work either (on either gcc version).   ;  mutable const Obj* p;,  just like  mutable int i;   ;  Ok, thanks. The way my editor colored mutable made me assume it behaved syntactically like const while it behaves more like virtual. Any idea if my original form (const Obj mutable *p;) is also valid since gcc 4 accepted it?   ;  I dunno about the actual standard but MSVC 2003/05 only accept mutable const foo* pPtr;