I've been searching for the different uses of the keyword mutable
. I've found that it is generally used for caching, lazy computing, mutex, ...
But I'm wondering if it is coherent to use it for a cursor on a readonly object.
For example, I have a sound class, and I want each sound to be able to keep track of a play cursor, for play/pause use, but I don't think this is part of the state of the sound. A const sound cannot be modified, but it can be read.
Is it ok to make the cursor attribute mutable?