id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10128,Use lockable_adapter with const objects or const members,anonymous,viboes,"I would like to use lockable_adapter pattern with const objects. Usually, we need to access in protected mode to one const object (read some value). We have a compiler error when we connect unique_lock and one derived class from lockable_adapter and the object is const. {{{ int func(const Class1& obj) { boost::unique_lock lock(obj); //boost::unique_lock lock(const_cast(obj)); return obj.get(); } }}} -> {{{ error C2664: 'boost::unique_lock::unique_lock(boost::upgrade_lock &)' : no se puede convertir el parámetro 1 de 'const Class1' a 'boost::upgrade_lock &' }}} The solution for us is rewrite the sentence with one const_cast -> boost::unique_lock lock(const_cast(obj)); We are using Visual C++ 2010 Best regards",Feature Requests,closed,,thread,Boost 1.54.0,Problem,wontfix,,