why does const not work on pointed objects?

J

Jeff Schwab

tom_usenet said:
The language enforces const-correctness for a reasonably logical
definition of that concept (ignoring const_cast and mutable for now).

Agreed. Changing the definition of that concept, e.g. to provide "deep
constness" by default (as the OP suggested), would risk the loss of the
"reasonably logical" property. I won't say that other definitions would
be "wrong," just different in a potentially misleading way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top