re PR libstdc++/83709 (Inserting duplicates into an unordered associative containers causes the container to invalidate iterators) 2018-01-09 François Dumont <fdumont@gcc.gnu.org> PR libstdc++/83709 * include/bits/hashtable_policy.h (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if __first != __last. (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New. (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)): Add false_type parameter. (_Insert_base::insert): Adapt. * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)): Adapt. (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)): Add __n_elt parameter, defaulted to 1. (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash policy _M_need_rehash. (_Hashtable::_M_merge_unique): Pass target number of elements to add to produce only 1 rehash if necessary. * testsuite/23_containers/unordered_map/insert/83709.cc: New. * testsuite/23_containers/unordered_set/insert/83709.cc: New. From-SVN: r256396
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
allocator | Loading commit data... | |
buckets | Loading commit data... | |
cons | Loading commit data... | |
debug | Loading commit data... | |
erase | Loading commit data... | |
hash_policy | Loading commit data... | |
insert | Loading commit data... | |
max_load_factor | Loading commit data... | |
modifiers | Loading commit data... | |
operations | Loading commit data... | |
operators | Loading commit data... | |
requirements | Loading commit data... | |
48101-2_neg.cc | Loading commit data... | |
48101_neg.cc | Loading commit data... | |
55043.cc | Loading commit data... | |
56267-2.cc | Loading commit data... | |
56267.cc | Loading commit data... | |
56278.cc | Loading commit data... | |
61143.cc | Loading commit data... | |
63456.cc | Loading commit data... | |
final_hash.cc | Loading commit data... | |
init-list.cc | Loading commit data... | |
instantiation_neg.cc | Loading commit data... | |
observers.cc | Loading commit data... | |
range_access.cc | Loading commit data... |