Original Post
Hi.. I currently am using a class that locks a mutex on data read and thus cannot declare itself as 'const' because the mutex writes.. would this be a good use of the 'mutable' operator??
class foo
{
lock l;
int i;
public:
int get() // I would like to put 'const' here
{
l.lock();
int r = i;
l.unlock();
return (r);
};