mutex must be mutable to be used in const method.
@@ -10,7 +10,7 @@ template <typename T>
class VarHolder
{
T _v;
- std::mutex _lock;
+ mutable std::mutex _lock;
public:
VarHolder() : _v(), _lock() {}
explicit VarHolder(const T &v) : _v(v), _lock() {}
