Subject: [Boost-bugs] [Boost C++ Libraries] #6618: boost::container::flat_map not transparently accepting move-only values
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-02-25 23:28:54
#6618: boost::container::flat_map not transparently accepting move-only values
---------------------------------------------------------+------------------
Reporter: Charles David Tallman <DaveTallman@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
Version: Boost 1.48.0 | Severity: Problem
Keywords: flat_map, moveable not copyable |
---------------------------------------------------------+------------------
I would have expected to be able to store move-only values in a
boost::container::flat_map, and to have no code changes except in the
header files, since it is supposed to be a drop-in replacement for
std::map. However, I cannot create a key-value pair of a type it will
accept, because of const errors. The attached program shows the problem.
Perhaps allowing a non-const std::pair reference to be passed to insert
would help, or even a new make_pair helper function that returned a
BOOST_RV_REF(value_type)?
The same thing happens with boost::container::map.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6618> 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:09 UTC