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 c++/69600] Incorrect use of copy-assignment instead of move assignment from function


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69600

--- Comment #3 from sshannin at gmail dot com ---
(In reply to Jonathan Wakely from comment #2)
> The value_type of your map is pair<const std::string, inner_data_t> an you
> can't move the first part of that pair, and you can't copy the second part
> of that pair, so you can't move or copy it.

I'm not sure exactly what you mean/what the value_type typedef inside the map
has to do with this.

Note that std::map<std::string, unique_ptr<int>> does seem to work here (where
presumably value_type is pair<const string, unique_ptr<int>>).

Also, I just confirmed this did previously work on gcc-4.8.2

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