About six years ago, a software engineer named Harri Porten wrote this article, asking the question, \"When should a member function have a const qualifier and when shouldn\'t i
General rule:
A member function should be
constif it both compiles when marked asconstand if it would still compile ifconstwere transitive w.r.t pointers.
Exceptions:
const