https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85858
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #10) > (In reply to Mike Sharov from comment #8) > > My mental model here is actually of const correctness, not C++ specifically. > > When I pass around a const object I expect it to stay unmodified. Consider a > > function that takes a const T* argument. The signature suggests that the > > passed-in object will only be read and will not be modified. > > No, no, no. It says **that function** can't modify it **through that > pointer**. If the pointee was not actually declared const then it can still > be changed. I misread your comment slightly, yes, it suggests the passed-in object will only be read and will not be modified **by that function**. But it can still be modified by other access paths, and if it's a pointer toan object on the heap it can certainly be deleted and therefore invalidated. You seem to be saying that a pointer-to-const implies an immortal object that will never be destroyed. Why should that be true for pointers to the heap but not pointers to the stack? It's not true, and it wouldn't make sense for it to be true.