forked from OSchip/llvm-project
Fix more bad member swap definitions in unordered_map.
The __unordered_map_equal and __unordered_map_hash wrappers attempt to swap const qualified predicates whenever the predicate is empty, and is subject to the EBO. Swapping const values seems blatently incorrect. This patch removes the const qualifier so the values are swapped as non-const. llvm-svn: 300154
This commit is contained in:
parent
7f72033e1c
commit
b3f5742551
|
@ -404,7 +404,7 @@ public:
|
|||
_NOEXCEPT_(__is_nothrow_swappable<_Hash>::value)
|
||||
{
|
||||
using _VSTD::swap;
|
||||
swap(static_cast<const _Hash&>(*this), static_cast<const _Hash&>(__y));
|
||||
swap(static_cast<_Hash&>(*this), static_cast<_Hash&>(__y));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -475,7 +475,7 @@ public:
|
|||
_NOEXCEPT_(__is_nothrow_swappable<_Pred>::value)
|
||||
{
|
||||
using _VSTD::swap;
|
||||
swap(static_cast<const _Pred&>(*this), static_cast<const _Pred&>(__y));
|
||||
swap(static_cast<_Pred&>(*this), static_cast<_Pred&>(__y));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue