Re: [Boost-bugs] [Boost C++ Libraries] #11229: vector incorrectly copies move-only objects using memcpy

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11229: vector incorrectly copies move-only objects using memcpy
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-02 12:20:02


#11229: vector incorrectly copies move-only objects using memcpy
-------------------------------+------------------------
  Reporter: joseph.thomson@… | Owner: igaztanaga
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: move
   Version: Boost 1.58.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+------------------------

Comment (by anonymous):

 The above discussion evolves around MSVC, but for GCC 4.9 and up Boost is
 currently still broken, but for that the fix that is used for Clang should
 be applicable as well as far as I can tell. So the resolution for #10389
 should also be applied for GCC 4.9 and up.

 So this simple program has different behaviour:


 {{{
 #include <memory>
 #include <boost/type_traits.hpp>

 static_assert(!boost::has_trivial_copy<std::unique_ptr<int>>::value,
     "Should not be trivially copyable");
 }}}

 * On GCC 4.7 the assert does not fire (using Boost 1.59), i.e. it is not
 considered trivially copyable.
 * On GCC 4.9 the assert does fire
 * On Clang 3.7 the assert does not fire (because Boost has a workaround
 for clang that doesn't use the has_trivial_copy intrinsic only but also
 tests for copy_constructible).

 For 4.9 this Clang workaround should be used as well in my opinion.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11229#comment:6>
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:19 UTC