const and volatile Member Functions
A class member function may be const or volatile or
both. Rules:
- volatile objects may only call
volatile member functions
- const objects may not invoke a non-const
member function
- a const member function may be invoked by
either a const or non-const object
All the above rules
combine for a function which is both const and volatile.