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: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 9 Jun 2011 13:27:59 +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 #28 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-09 13:27:56 UTC ---
(In reply to comment #26)
> For map, the first argument to emplace is going to be the key (I believe). We
> can therefore determine if the key is already present in the map before we
> construct the value object from the remaining arguments to emplace.
Not necessarily:
std::map<int, int> m;
m.emplace(piecewise_construct_t, make_tuple(1), make_tuple(2));