[Boost-bugs] [Boost C++ Libraries] #13420: small_vector - invalid move constructor/move assignment for size < N

Subject: [Boost-bugs] [Boost C++ Libraries] #13420: small_vector - invalid move constructor/move assignment for size < N
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-25 04:54:18


#13420: small_vector - invalid move constructor/move assignment for size < N
--------------------------------+---------------------------
 Reporter: Antervis | Owner: Ion Gaztañaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost 1.65.0 | Severity: Problem
 Keywords: small_vector, move |
--------------------------------+---------------------------
 When **small_vector** is move-constructed or move-assigned from another
 **small_vector**, the initial one has elements moved out, but vector size
 is left unchanged. This only happens if internal vector memory is used
 (vector size is less than in-place capacity N)

 {{{
 small_vector<int, 5> a = {1,2,3};
 small_vector<int, 5> b = std::move(a);
 // after the assignment, a.size() is 3
 }}}

 Detailed example is [https://wandbox.org/permlink/j8fRFEpWcj9Iaz6x here].

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13420>
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 : 2018-01-25 04:59:42 UTC