diff options
| author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-20 15:49:39 +0000 |
|---|---|---|
| committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-20 15:49:39 +0000 |
| commit | 6867ca2d0a1360162e3030f813b89a1c4bdc81bb (patch) | |
| tree | fc11c1e5cd8a03a58439ed2e28082fd5ee493633 /libstdc++-v3/include/debug/unordered_set | |
| parent | de38f22670455a6cb1b4fe9a758ebf39ba899b83 (diff) | |
| download | ppe42-gcc-6867ca2d0a1360162e3030f813b89a1c4bdc81bb.tar.gz ppe42-gcc-6867ca2d0a1360162e3030f813b89a1c4bdc81bb.zip | |
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
Diffstat (limited to 'libstdc++-v3/include/debug/unordered_set')
| -rw-r--r-- | libstdc++-v3/include/debug/unordered_set | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 82461415ba7..3bc3fab5610 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -383,7 +383,7 @@ namespace __debug { return __it == __victim; }); this->_M_invalidate_local_if( [__victim](_Base_const_local_iterator __it) - { return __it._M_cur == __victim._M_cur; }); + { return __it._M_curr() == __victim._M_cur; }); size_type __bucket_count = this->bucket_count(); _Base::erase(__victim); _M_check_rehashed(__bucket_count); @@ -402,7 +402,7 @@ namespace __debug { return __it == __victim; }); this->_M_invalidate_local_if( [__victim](_Base_const_local_iterator __it) - { return __it._M_cur == __victim._M_cur; }); + { return __it._M_curr() == __victim._M_cur; }); size_type __bucket_count = this->bucket_count(); _Base_iterator __next = _Base::erase(__it.base()); _M_check_rehashed(__bucket_count); @@ -429,7 +429,7 @@ namespace __debug { return __it == __tmp; }); this->_M_invalidate_local_if( [__tmp](_Base_const_local_iterator __it) - { return __it._M_cur == __tmp._M_cur; }); + { return __it._M_curr() == __tmp._M_cur; }); } size_type __bucket_count = this->bucket_count(); _Base_iterator __next = _Base::erase(__first.base(), @@ -832,7 +832,7 @@ namespace __debug { return __it == __victim; }); this->_M_invalidate_local_if( [__victim](_Base_const_local_iterator __it) - { return __it._M_cur == __victim._M_cur; }); + { return __it._M_curr() == __victim._M_cur; }); _Base::erase(__victim++); ++__ret; } @@ -848,7 +848,7 @@ namespace __debug { return __it == __victim; }); this->_M_invalidate_local_if( [__victim](_Base_const_local_iterator __it) - { return __it._M_cur == __victim._M_cur; }); + { return __it._M_curr() == __victim._M_cur; }); return iterator(_Base::erase(__it.base()), this); } @@ -871,7 +871,7 @@ namespace __debug { return __it == __tmp; }); this->_M_invalidate_local_if( [__tmp](_Base_const_local_iterator __it) - { return __it._M_cur == __tmp._M_cur; }); + { return __it._M_curr() == __tmp._M_cur; }); } return iterator(_Base::erase(__first.base(), __last.base()), this); |

