Using const and volatile simultaneously

I have heard and read that const and volatile can be used simultaneously for member functions and variables but i didn't exactly understand the purpose of using them like that. Can anybody explain the purpose of such a feature in C++ ?
A data member of a class may be declared volatile because, for example, it might represent the value stored in some memory mapped PCI port.

A accessor function for the data member is probably declared const.

Inside the accessor function, the data member is actually a const volatile.
Topic archived. No new replies allowed.