id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2501,upgrade_to_unique_lock doesn't compile on C++0x mode,Rodolfo Lima,viboes,"The following code doesn't compile with gcc-4.3.2 (and gcc-4.4.0), and boost-1.36 (and boost-1.37) when using -std=c++0x on linux. #include int main() { boost::shared_mutex mtx; boost::upgrade_lock lk(mtx); boost::upgrade_to_unique_lock lk2(lk); } gcc spits: g++-4.4.0-alpha20081003 -std=c++0x -I src/boost-trunk teste.cpp -o teste In file included from src/boost-trunk/boost/thread/pthread/mutex.hpp:11, from src/boost-trunk/boost/thread/mutex.hpp:16, from src/boost-trunk/boost/thread/pthread/shared_mutex.hpp:12, from src/boost-trunk/boost/thread/shared_mutex.hpp:16, from teste.cpp:1: src/boost-trunk/boost/thread/locks.hpp: In destructor 'boost::upgrade_to_unique_lock::~upgrade_to_unique_lock() [with Mutex = boost::shared_mutex]': teste.cpp:8: instantiated from here src/boost-trunk/boost/thread/locks.hpp:807: error: no match for 'operator=' in '*((boost::upgrade_to_unique_lock*)this)->boost::upgrade_to_unique_lock::source = boost::move [with Mutex = boost::shared_mutex](((boost::unique_lock&&)(&((boost::upgrade_to_unique_lock*)this)->boost::upgrade_to_unique_lock::exclusive)))' src/boost-trunk/boost/thread/locks.hpp:643: note: candidates are: boost::upgrade_lock & boost::upgrade_lock::operator=(boost::upgrade_lock &) [with Mutex = boost::shared_mutex] src/boost-trunk/boost/thread/locks.hpp:694: note: boost::upgrade_lock & boost::upgrade_lock::operator=(boost::detail::thread_move_t >) [with Mutex = boost::shared_mutex] src/boost-trunk/boost/thread/locks.hpp:701: note: boost::upgrade_lock& boost::upgrade_lock::operator=(boost::detail::thread_move_t >) [with Mutex = boost::shared_mutex] src/boost-trunk/boost/thread/locks.hpp: In constructor 'boost::unique_lock::unique_lock(boost::upgrade_lock&&) [with Mutex = boost::shared_mutex]': src/boost-trunk/boost/thread/locks.hpp:801: instantiated from 'boost::upgrade_to_unique_lock::upgrade_to_unique_lock(boost::upgrade_lock&) [with Mutex = boost::shared_mutex]' teste.cpp:8: instantiated from here src/boost-trunk/boost/thread/locks.hpp:775: error: request for member 'unlock_upgrade_and_lock' in '((boost::unique_lock*)this)->boost::unique_lock::m', which is of non-class type 'boost::shared_mutex*' It compiles fine in non std++0x mode. Regards, Rodolfo Lima ",Support Requests,closed,,thread,Boost Development Trunk,Problem,fixed,move,jwakely.boost@… braden@… viboes