summaryrefslogtreecommitdiffstats
path: root/libcxx/include/unordered_map
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-04-13 01:02:41 +0000
committerEric Fiselier <eric@efcs.ca>2017-04-13 01:02:41 +0000
commitb3f57425512f04f94ea520d07a7141109303e020 (patch)
treea8838e713101e154f3c421869743641b33f50331 /libcxx/include/unordered_map
parent7f72033e1cde7a3a76da8c79634dfb7bf4919b54 (diff)
downloadbcm5719-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_map4
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));
}
};
OpenPOWER on IntegriCloud