Boost C++ Libraries: Ticket #6618: boost::container::flat_map not transparently accepting move-only values https://svn.boost.org/trac10/ticket/6618 <p> 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. </p> <p> 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)? </p> <p> The same thing happens with boost::container::map. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6618 Trac 1.4.3 Charles David Tallman <DaveTallman@…> Sat, 25 Feb 2012 23:30:45 GMT attachment set https://svn.boost.org/trac10/ticket/6618 https://svn.boost.org/trac10/ticket/6618 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">simple_req.cpp</span> </li> </ul> <p> Source file that will not compile under g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52) </p> Ticket Charles David Tallman <DaveTallman@…> Sat, 25 Feb 2012 23:31:56 GMT attachment set https://svn.boost.org/trac10/ticket/6618 https://svn.boost.org/trac10/ticket/6618 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">ppp</span> </li> </ul> <p> Text file showing compile errors </p> Ticket Charles David Tallman <DaveTallman@…> Sat, 25 Feb 2012 23:35:34 GMT attachment set https://svn.boost.org/trac10/ticket/6618 https://svn.boost.org/trac10/ticket/6618 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">simple_req.2.cpp</span> </li> </ul> <p> Typo in that first source file I attached. Trying again. </p> Ticket swish@… Wed, 11 Dec 2013 20:04:56 GMT <link>https://svn.boost.org/trac10/ticket/6618#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6618#comment:1</guid> <description> <p> Is it the same as this problem reported to the mailing list? Was that issue ever fixed? </p> <p> I'm getting this with Boost 1.49. There doesn't seem to be any way to store move-only objects in a map. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 06 Dec 2015 08:48:52 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6618#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6618#comment:2</guid> <description> <p> Maybe I'm wrong Ion, but shouldn't you use a move aware pair? Sorry, if this is already the case. </p> </description> <category>Ticket</category> </item> </channel> </rss>