Re: [Boost-bugs] [Boost C++ Libraries] #8764: Improve traits of Boost.Move

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8764: Improve traits of Boost.Move
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-16 08:13:54


#8764: Improve traits of Boost.Move
-------------------------------+------------------------
  Reporter: apolukhin | Owner: igaztanaga
      Type: Feature Requests | Status: closed
 Milestone: Boost 1.55.0 | Component: move
   Version: Boost 1.54.0 | Severity: Regression
Resolution: fixed | Keywords:
-------------------------------+------------------------

Comment (by apolukhin):

 I'm afraid that the improved trait breaks one of the tests in
 `libs/move/test/move.hpp`.

 Following assert:
 {{{
    BOOST_STATIC_ASSERT((boost::has_nothrow_move<copyable>::value ==
 false));
 }}}
 will be failing now. According to C++11 Standard
 `is_nothrow_move_constructible` evaluates to `true` if the following code
 does not throw:
 {{{
 copyable var(std::move(nonconst_copyable_variable))
 }}}

 Such code does not throw even if the `copyable` has no move constructor,
 but has a nothrow copy constructor.

 Following solution could be used to fix tests:
 {{{
    // Attempt to move construct `copyable` type won't throw exceptions in
 C++03 and C++11
    BOOST_STATIC_ASSERT((boost::has_nothrow_move<copyable>::value ==
 true));
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8764#comment:2>
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:50:13 UTC