diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-04-13 01:02:41 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-04-13 01:02:41 +0000 |
| commit | b3f57425512f04f94ea520d07a7141109303e020 (patch) | |
| tree | a8838e713101e154f3c421869743641b33f50331 /libcxx/include/unordered_map | |
| parent | 7f72033e1cde7a3a76da8c79634dfb7bf4919b54 (diff) | |
| download | bcm5719-llvm-b3f57425512f04f94ea520d07a7141109303e020.tar.gz bcm5719-llvm-b3f57425512f04f94ea520d07a7141109303e020.zip | |
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
Diffstat (limited to 'libcxx/include/unordered_map')
| -rw-r--r-- | libcxx/include/unordered_map | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index 3f3808c1e2a..4fdac160f92 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -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)); } }; |

