This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/59872] New: Cannot move std::map with move-only mapped_type


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 ) );


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]