This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/44436] [C++0x] Implement emplace* in associative and unordered containers
- From: "Kira.Backes at NRWsoft dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 9 Jun 2011 12:00:10 +0000
- Subject: [Bug libstdc++/44436] [C++0x] Implement emplace* in associative and unordered containers
- Auto-submitted: auto-generated
- References: <bug-44436-4@http.gcc.gnu.org/bugzilla/>
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