Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10389: [container] Double free problem on boost::containers::vector<std::unique_ptr<T>>
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-22 12:19:05
#10389: [container] Double free problem on
boost::containers::vector<std::unique_ptr<T>>
-------------------------------------+-------------------------
Reporter: kbinani <kbinani.bt@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: type_traits
Version: Boost 1.56.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------------+-------------------------
Changes (by igaztanaga):
* owner: igaztanaga => johnmaddock
* component: container => type_traits
Comment:
I've found boost::has_trivial_copy returns true for unique_ptr in Clang.
I've found related issues here:
http://stackoverflow.com/questions/12754886/has-trivial-copy-behaves-
differently-in-clang-and-gcc-whos-right
and
http://stackoverflow.com/questions/22812183/a-deleted-default-constructor-
could-still-be-trivial
the problem is that it's not clear if types with deleted copy constructor
can still be trivially copy constructible.
I don't know if boost::has_trivial_copy has defined behaviour on this and
this might be a bug, I'm reassining to TypeTraits (John) in case it's
considered a bug.
If not, please reassign it to Container. The workaround is to use
is_copy_constructible && has_trivial_copy to know if a type has a copy
constructor that is trivial, and memcpy can be used to move objects.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10389#comment:1> 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:16 UTC