Boost C++ Libraries: Ticket #1640: [Thread] warnings from VC9 + warning level 4 https://svn.boost.org/trac10/ticket/1640 <p> Running the Thread tests with VC9 on warning level 4 produces some warnings: </p> <pre class="wiki">boost/thread/win32/condition_variable.hpp(111) : warning C4512: 'boost::detail::basic_condition_variable::relocker&lt;lock_type&gt;' : assignment operator could not be generated boost/thread/detail/move.hpp(25) : warning C4512: 'boost::detail::thread_move_t&lt;T&gt;' : assignment operator could not be generated boost/thread/win32/once.hpp(49) : warning C4512: 'boost::detail::win32_mutex_scoped_lock' : assignment operator could not be generated boost\thread\win32\basic_timed_mutex.hpp(67) : warning C4127: conditional expression is constant boost/thread/win32/thread.hpp(182) : warning C4251: 'boost::thread::thread_info_mutex' : class 'boost::mutex' needs to have dll-interface to be used by clients of class 'boost::thread' boost/thread/win32/thread.hpp(183) : warning C4251: 'boost::thread::thread_info' : class 'boost::intrusive_ptr&lt;T&gt;' needs to have dll-interface to be used by clients of class 'boost::thread' </pre><p> There are also some warnings from the tests themselves: </p> <pre class="wiki">libs\thread\test\condition_test_common.hpp(37) : warning C4512: 'wait_for_flag::check_flag' : assignment operator could not be generated libs/thread/test/util.inl(170) : warning C4512: '`anonymous-namespace'::thread_member_binder&lt;R,T&gt;' : assignment operator could not be generated libs/thread/test/util.inl(126) : warning C4512: '`anonymous-namespace'::indirect_adapter&lt;F&gt;' : assignment operator could not be generated libs\thread\test\shared_mutex_locking_thread.hpp(59) : warning C4512: 'locking_thread&lt;lock_type&gt;' : assignment operator could not be generated test_shared_mutex_part_2.cpp(139) : warning C4512: '`anonymous-namespace'::simple_writing_thread' : assignment operator could not be generated test_shared_mutex_part_2.cpp(205) : warning C4512: '`anonymous-namespace'::simple_reading_thread' : assignment operator could not be generated </pre><p> Attached is a patch that silences the 4512 warning from the public headers by adding private assignment operators. I think the 4251 warnings can only be silenced by turing off the warnings with a pragma. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1640 Trac 1.4.3 Richard Webb <richard.webb@…> Sun, 17 Feb 2008 00:15:52 GMT attachment set https://svn.boost.org/trac10/ticket/1640 https://svn.boost.org/trac10/ticket/1640 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">thread4512.patch</span> </li> </ul> Ticket Anthony Williams Wed, 19 Mar 2008 17:25:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1640#comment:1 https://svn.boost.org/trac10/ticket/1640#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">fixed</span> </li> </ul> Ticket