aboutsummaryrefslogtreecommitdiff
path: root/libssp
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2018-01-09 21:05:10 +0000
committerFrançois Dumont <fdumont@gcc.gnu.org>2018-01-09 21:05:10 +0000
commit0f1462579e348656b9a5549721f926d6f5894e1c (patch)
treef299bb47be49fefdcc1c4f42f77dac57c278a88f /libssp
parent19d22f7c90d87eb9a3c5715cfa59407e2baeabbc (diff)
downloadgcc-0f1462579e348656b9a5549721f926d6f5894e1c.zip
gcc-0f1462579e348656b9a5549721f926d6f5894e1c.tar.gz
gcc-0f1462579e348656b9a5549721f926d6f5894e1c.tar.bz2
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
Diffstat (limited to 'libssp')
0 files changed, 0 insertions, 0 deletions