Implement N4279, Improved insertion interface for unique-key maps.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Sat, 8 Aug 2015 22:57:13 +0000 (01:57 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Sat, 8 Aug 2015 22:57:13 +0000 (01:57 +0300)
commitb95170d38038bec337dd5f7a09eb0ebc6f8f3a42
treeae95c860f7ec2ca9538a596d7fdb30ceddcf540e
parentd0920fa2df270f349c27c3b2f9de8f2f5e617f82
Implement N4279, Improved insertion interface for unique-key maps.

2015-08-09  Ville Voutilainen  <ville.voutilainen@gmail.com>

Implement N4279, Improved insertion interface for unique-key maps.
* include/bits/stl_map.h (try_emplace, insert_or_assign): New.
* include/bits/stl_tree.h (_M_get_insert_unique_pos,
_M_get_insert_equal_pos, _M_get_insert_hint_unique_pos,
_M_get_insert_hint_equal_pos): Make public.
* include/bits/unordered_map.h (try_emplace, insert_or_assign): New.
* testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
Likewise.
* testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
* testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
Likewise.
* testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
Likewise.

From-SVN: r226743
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_map.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/include/bits/unordered_map.h
libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc [new file with mode: 0644]