PR libstdc++/56267
commit6867ca2d0a1360162e3030f813b89a1c4bdc81bb
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Jan 2014 15:49:39 +0000 (20 15:49 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Jan 2014 15:49:39 +0000 (20 15:49 +0000)
treefc11c1e5cd8a03a58439ed2e28082fd5ee493633
parentde38f22670455a6cb1b4fe9a758ebf39ba899b83
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206834 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/include/debug/safe_local_iterator.h
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/testsuite/23_containers/unordered_set/56267-2.cc [new file with mode: 0644]