[Bug libstdc++/56267] [4.7/4.8/4.9 Regression] unordered containers require Assignable hash function
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 20 15:50:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56267
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Mon Jan 20 15:49:39 2014
New Revision: 206834
URL: http://gcc.gnu.org/viewcvs?rev=206834&root=gcc&view=rev
Log:
PR libstdc++/56267
* include/bits/hashtable_policy.h (_Hash_code_base<... false>): Grant
friendship to _Local_iterator_base<..., false>.
(_Local_iterator_base): Give protected access to all existing members.
(_Local_iterator_base::_M_curr()): New public accessor.
(_Local_iterator_base::_M_get_bucket()): New public accessor.
(_Local_iterator_base<..., false>::_M_init()): New function to manage
the lifetime of the _Hash_code_base explicitly.
(_Local_iterator_base<..., false>::_M_destroy()): Likewise.
(_Local_iterator_base<..., false>): Define copy constructor and copy
assignment operator that use new functions to manage _Hash_code_base.
(operator==(const _Local_iterator_base&, const _Local_iterator_base&),
operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
Use public API for _Local_iterator_base.
* include/debug/safe_local_iterator.h (_Safe_local_iterator): Likewise.
* include/debug/unordered_map (__debug::unordered_map::erase(),
__debug::unordered_multimap::erase()): Likewise.
* include/debug/unordered_set (__debug::unordered_set::erase(),
__debug::unordered_multiset::erase()): Likewise.
* testsuite/23_containers/unordered_set/56267-2.cc: New test.
Added:
trunk/libstdc++-v3/testsuite/23_containers/unordered_set/56267-2.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/hashtable_policy.h
trunk/libstdc++-v3/include/debug/safe_local_iterator.h
trunk/libstdc++-v3/include/debug/unordered_map
trunk/libstdc++-v3/include/debug/unordered_set
More information about the Gcc-bugs
mailing list