Jump to content
  • Advertisement
Sign in to follow this  
255

mutable syntax question (solved)

This topic is 4856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 says symbols.hpp:369: error: declaration does not declare anything symbols.hpp:369: error: syntax error before `mutable' [Edited by - 255 on December 2, 2005 12:55:21 PM]

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!