[Bug libstdc++/59872] New: Cannot move std::map with move-only mapped_type
potswa at mac dot com
gcc-bugzilla@gcc.gnu.org
Sat Jan 18 11:17:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59872
Bug ID: 59872
Summary: Cannot move std::map with move-only mapped_type
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: potswa at mac dot com
This fails because the std::map move constructor apparently invokes a copy
operation. It was working recently (on trunk), so it looks like a regression.
#include <map>
#include <memory>
std::map< int, std::unique_ptr< int > > q, r( std::move( q ) );
More information about the Gcc-bugs
mailing list