[Boost-bugs] [Boost C++ Libraries] #1640: [Thread] warnings from VC9 + warning level 4

Subject: [Boost-bugs] [Boost C++ Libraries] #1640: [Thread] warnings from VC9 + warning level 4
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-02-17 00:15:31


#1640: [Thread] warnings from VC9 + warning level 4
---------------------------------------------------------+------------------
 Reporter: Richard Webb <richard.webb_at_[hidden]> | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost Development Trunk | Severity: Cosmetic
 Keywords: |
---------------------------------------------------------+------------------
 Running the Thread tests with VC9 on warning level 4 produces some
 warnings:

 {{{
 boost/thread/win32/condition_variable.hpp(111) : warning C4512:
 'boost::detail::basic_condition_variable::relocker<lock_type>' :
 assignment operator could not be generated
 boost/thread/detail/move.hpp(25) : warning C4512:
 'boost::detail::thread_move_t<T>' : 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<T>' needs to
 have dll-interface to be used by clients of class 'boost::thread'
 }}}

 There are also some warnings from the tests themselves:
 {{{
 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<R,T>' : assignment operator could not be
 generated
 libs/thread/test/util.inl(126) : warning C4512: '`anonymous-
 namespace'::indirect_adapter<F>' : assignment operator could not be
 generated
 libs\thread\test\shared_mutex_locking_thread.hpp(59) : warning C4512:
 'locking_thread<lock_type>' : 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
 }}}

 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.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1640>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC