Boost C++ Libraries: Ticket #5751: can not (find) compile boost/thread/read_write_mutex.hpp https://svn.boost.org/trac10/ticket/5751 <p> in order to fill read_write_mutex.hpp I found 3 files in web read_wirte_mutex.hpp, lock.hpp, read_write_lock.hpp but I got many compile error with my current 1.46.1 </p> <hr /> <p> root@eric-laptop:/home/eric/cppcookbook/ch12# g++ -lboost_thread Example12-3.cpp In file included from /usr/include/boost/thread/read_write_mutex.hpp:26:0, </p> <blockquote> <p> from Example12-3.cpp:3: </p> </blockquote> <p> /usr/local/include/boost/thread/condition.hpp:13:36: error: conflicting declaration ‘typedef class boost::condition_variable_any boost::condition’ /usr/include/boost/thread/detail/lock.hpp:17:7: error: ‘struct boost::condition’ has a previous declaration as ‘struct boost::condition’ In file included from Example12-3.cpp:3:0: /usr/include/boost/thread/read_write_mutex.hpp:64:22: error: field ‘m_waiting_writers’ has incomplete type /usr/include/boost/thread/read_write_mutex.hpp:65:22: error: field ‘m_waiting_readers’ has incomplete type /usr/include/boost/thread/read_write_mutex.hpp:69:22: error: field ‘m_waiting_promotion’ has incomplete type Example12-3.cpp:41:4: error: ‘read_wirte_mutex’ in namespace ‘boost’ does not name a type </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5751 Trac 1.4.3 Steven Watanabe Mon, 29 Aug 2011 16:33:37 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5751#comment:1 https://svn.boost.org/trac10/ticket/5751#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> It's called shared_mutex now. See <a href="http://www.boost.org/doc/libs/1_47_0/doc/html/thread/synchronization.html#thread.synchronization.mutex_types.shared_mutex">http://www.boost.org/doc/libs/1_47_0/doc/html/thread/synchronization.html#thread.synchronization.mutex_types.shared_mutex</a> </p> Ticket