mirror of git://gcc.gnu.org/git/gcc.git
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 |
||
|---|---|---|
| .. | ||
| allocator | ||
| cons | ||
| debug | ||
| erase | ||
| hash_policy | ||
| insert | ||
| modifiers | ||
| operations | ||
| operators | ||
| profile | ||
| requirements | ||
| 48101-2_neg.cc | ||
| 48101_neg.cc | ||
| 55043.cc | ||
| 59548.cc | ||
| dr761.cc | ||
| final_hash.cc | ||
| init-list.cc | ||
| observers.cc | ||
| pmr_typedefs.cc | ||
| pmr_typedefs_debug.cc | ||
| range_access.cc | ||