[Boost-bugs] [Boost C++ Libraries] #11939: Issues with boost::interprocess::shared_ptr's move constructor and move assignment operator.

Subject: [Boost-bugs] [Boost C++ Libraries] #11939: Issues with boost::interprocess::shared_ptr's move constructor and move assignment operator.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-26 07:38:51


#11939: Issues with boost::interprocess::shared_ptr's move constructor and move
assignment operator.
------------------------------+--------------------------
 Reporter: aivazyan@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.60.0 | Severity: Problem
 Keywords: |
------------------------------+--------------------------
 The boost::interprocess::shared_ptr's move constructor is declared as
 explicit which makes it copy when user does a move. Similarly, move
 assignment operator is missing to move the argument to temporary before
 swapping.

 {{{
 boost::interprocess::shared_ptr<...> p = ...;
 assert(p.unique());
 auto p1 = std::move(p); // Does a copy.
 assert(p1.unique()); // Fails.
 decltype(p) p2;
 p2 = std::move(p1); // Does a copy.
 assert(p2.unique()); // Fails.
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11939>
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