A variable marked with keyword mutable
allows for it to be modified in a method declared const
.
This means...
Mutable interacts with const. If we have a const pointer, we normally could not change members. Mutable provides an exception to that rule.
A variable marked with keyword volatile
tells the compiler that it must read/write the variable every time.