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++/44436] [C++0x] Implement emplace* in associative and unordered containers


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44436

--- Comment #19 from Kira Backes <Kira.Backes at NRWsoft dot de> 2011-06-09 11:59:29 UTC ---
Because the usual add functions would have to copy the unique_ptr and that
doesn't work. As I see it in a map there are only insert functions for pairs.
So if this works I'd have to create a pair and then use the created pair to
insert it into the map, I'm gonna test it. But it would double the code size.

As I understand it the emplace is just like an alias that forwards the 2
parameters into a pair constructor and inserts it afterwards.



rgds, Kira


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