Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11835: boost::has_trivial_copy is incorrect on Clang
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-12 18:31:39
#11835: boost::has_trivial_copy is incorrect on Clang
-------------------------+-------------------------------------------------
Reporter: | Owner: johnmaddock
joseph.thomson@⦠| Status: closed
Type: Bugs | Component: type_traits
Milestone: To Be | Severity: Problem
Determined | Keywords: has_trivial_copy clang memcpy
Version: Boost | is_trivially_copyable
1.59.0 |
Resolution: wontfix |
-------------------------+-------------------------------------------------
Changes (by johnmaddock):
* status: new => closed
* resolution: => wontfix
Comment:
The point here is that has_trivial_copy is a Boost-specific trait so we
can do what we want, and much more importantly: defining non-copyable
types as trivially copyable drives a coach and horses through type safety,
and leads to downright nasty and pernicious bugs. The original bug report
you referenced is one such - types that are moveable but not copyable
should never, ever be memcpy'd. If they are, then bad things typically
happen. I may add a note to the docs to this effect, but the more I think
about this the less inclined I am to make any change to current behaviour.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11835#comment:3> 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