unordered containers emplace
François Dumont
frs.dumont@gmail.com
Sun Dec 4 20:04:00 GMT 2011
Hi
This is the implementation of emplace and emplace_hint for
unordered containers. For the moment in emplace_hint the hint iterator
is not considered like in the current insert with hint implementation.
Tested under linux x86_64.
2011-12-04 François Dumont <fdumont@gcc.gnu.org>
* include/bits/hashtable.h (_Hashtable<>::emplace,
_Hashtable<>::emplace_hint): Add.
* include/debug/unordered_set (unordered_set<>::emplace,
unordered_set<>::emplace_hint, unordered_multiset<>::emplace,
unordered_multiset<>::emplace_hint): Add.
* include/debug/unordered_map (unordered_map<>::emplace,
unordered_map<>::emplace_hint, unordered_multimap<>::emplace,
unordered_multimap<>::emplace_hint): Add.
* testsuite/23_containers/unordered_map/modifiers/emplace.cc: New.
* testsuite/23_containers/unordered_multimap/modifiers/emplace.cc:
New.
* testsuite/23_containers/unordered_set/modifiers/emplace.cc: New.
* testsuite/23_containers/unordered_multiset/modifiers/emplace.cc:
New.
* testsuite/util/testsuite_container_traits.h
(traits_base::has_emplace): Add and defined as std::true_type for
unordered containers.
* testsuite/util/exception/safety.h (emplace, emplace_hint):
Add and
use them in basic_safety exception test case.
* doc/xml/manual/status_cxx2011.xml: Update unordered containers
status.
Ok to commit in trunk ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unordered_emplace.patch
Type: text/x-patch
Size: 25885 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20111204/0038b2cf/attachment.bin>
More information about the Libstdc++
mailing list