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 13:35:32


#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 joseph.thomson@…):

 Replying to [comment:7 anonymous]:
> Note that more recent GCC versions have `__is_trivially_copyable` as an
 intrinsic, which correctly marks a unique_ptr as not being trivially
 copyable (the difference with `__has_trivial_copy`) seems to be that the
 newer intrinsic does take the requirement of a non-trivial destructor into
 account).

 A trivially copyable class must have:

 * No non-trivial copy constructors
 * No non-trivial copy assignment operators
 * No non-trivial move constructors
 * No non-trivial move assignment operators
 * A trivial destructor

 `__has_trivial_copy` simply reports whether the class has a trivial copy
 constructor.

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