gcc/libstdc++-v3/testsuite/23_containers/unordered_map
Jonathan Wakely bc62e155e4 PR libstdc++/78595 implement insertion into maps in terms of emplace
C++14 simplified the specification of the generic insert function
templates to be equivalent to calling emplace (or emplace_hint).
Defining them in terms of emplace takes care of the problems described
in PR 78595, ensuring a single conversion to value_type is done at the
right time.

	PR libstdc++/78595
	* include/bits/stl_map.h (map::insert(_Pair&&))
	(map::insert(const_iterator, _Pair&&)): Do emplace instead of insert.
	* include/bits/stl_multimap.h (multimap::insert(_Pair&&))
	(multimap::insert(const_iterator, _Pair&&)): Likewise.
	* include/bits/unordered_map.h (unordered_map::insert(_Pair&&))
	(unordered_map::insert(const_iterator, _Pair&&))
	(unordered_multimap::insert(_Pair&&))
	(unordered_multimap::insert(const_iterator, _Pair&&)): Likewise.
	* testsuite/23_containers/map/modifiers/insert/78595.cc: New test.
	* testsuite/23_containers/multimap/modifiers/insert/78595.cc: New test.
	* testsuite/23_containers/unordered_map/modifiers/78595.cc: New test.
	* testsuite/23_containers/unordered_multimap/modifiers/78595.cc: New
	test.

From-SVN: r264059
2018-09-03 15:25:12 +01:00
..
allocator Update copyright years. 2018-01-03 11:03:58 +01:00
cons Update copyright years. 2018-01-03 11:03:58 +01:00
debug Update copyright years. 2018-01-03 11:03:58 +01:00
erase Update copyright years. 2018-01-03 11:03:58 +01:00
hash_policy Update copyright years. 2018-01-03 11:03:58 +01:00
insert re PR libstdc++/83709 (Inserting duplicates into an unordered associative containers causes the container to invalidate iterators) 2018-01-09 21:05:10 +00:00
modifiers PR libstdc++/78595 implement insertion into maps in terms of emplace 2018-09-03 15:25:12 +01:00
operations P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
operators Update copyright years. 2018-01-03 11:03:58 +01:00
profile Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
requirements Update copyright years. 2018-01-03 11:03:58 +01:00
48101-2_neg.cc Update copyright years. 2018-01-03 11:03:58 +01:00
48101_neg.cc Update copyright years. 2018-01-03 11:03:58 +01:00
55043.cc Update copyright years. 2018-01-03 11:03:58 +01:00
59548.cc Update copyright years. 2018-01-03 11:03:58 +01:00
dr761.cc Update copyright years. 2018-01-03 11:03:58 +01:00
final_hash.cc Update copyright years. 2018-01-03 11:03:58 +01:00
init-list.cc Update copyright years. 2018-01-03 11:03:58 +01:00
observers.cc Update copyright years. 2018-01-03 11:03:58 +01:00
pmr_typedefs.cc Define aliases for containers using polymorphic_allocator 2018-08-10 00:25:53 +01:00
pmr_typedefs_debug.cc Forward declare debug containers so std::pmr aliases work 2018-08-24 18:43:18 +01:00
range_access.cc Update copyright years. 2018-01-03 11:03:58 +01:00