Tags

links:
http://www.possibility.com/Cpp/const.html

summary:
– mutable can relief attribute from the const restriction
– const for readonly value
– const for pointer address and const for memory pointing to
– const int* p, pointer readonly, if const is before *
– int* const p, pointing memory readonly, if const is before variable name or after *
– function declarations also honor const, so the caller of your member functions can be enforced readonly on the returned value (well there are better way of doing this by defensive copy but that’s what const can do according to the link.)

Advertisements