Subject: [Boost-bugs] [Boost C++ Libraries] #11830: small_vector move is broken
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-04 22:22:13
#11830: small_vector move is broken
-----------------------------------------+-------------------------
Reporter: mrmiller <michael_miller@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
Version: Boost 1.59.0 | Severity: Showstopper
Keywords: small_vector move |
-----------------------------------------+-------------------------
Moving a small_vector from a to b doesn't properly clear the contents from
a. This is true for both the move constructor and operator=. See the brief
example below:
{{{
boost::container::small_vector<std::unique_ptr<int>, 8> a;
a.emplace_back(std::unique_ptr<int>{new int{1}});
assert(a.size() == 1);
auto b = std::move(a);
assert(b.size() == 1);
assert(a.size() == 0); // this fails
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11830> 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