PR libstdc++/92124 fix incorrect unordered container move assignment
authorFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 9 Jan 2020 05:40:08 +0000 (05:40 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 9 Jan 2020 05:40:08 +0000 (05:40 +0000)
commitb9c84e95030d375a275f4e518dbc60a397dd5151
tree5cb9344bf433dbc115142125b2b2822b996fe39e
parente4d2203e31e7c017266e61dbf0d24ee85e59fa55
PR libstdc++/92124 fix incorrect unordered container move assignment

* include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
template alias.
(_Hashtable<>::__fwd_value_for): New.
(_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
parameter.
(_Hashtable<>::_M_assign<>): Add _Ht template parameter.
(_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
(_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
with std::move.
(_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
(_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
Adapt.
(_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
Adapt.
* testsuite/23_containers/unordered_set/92124.cc: New.

From-SVN: r280028
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/testsuite/23_containers/unordered_set/92124.cc [new file with mode: 0644]