On Friday, 17 August 2012 at 02:02:56 UTC, Jonathan M Davis wrote:
How is it a bug? The variable that you're altering is not part of the object.
It doesn't need to be. What you said was:
If you have a const object, then you have the guarantee that none of what it contains or refers to ____either directly or indirectly_____ can be altered through that reference or pointer.
But as I just showed, it can, so... yeah.
That's part of why having pure with const in so valuable.
Right, but purity is another topic. :)