Fix compiler error on clang/gcc

This commit is contained in:
Brian McKinnon
2020-05-02 18:25:02 -05:00
parent adc918235e
commit 131a84f6ed
+2 -2
View File
@@ -3401,7 +3401,7 @@ public:
template <class K = key_type, class V = mapped_type>
bool contains(const key_arg<K>& key, V& v) const {
typename Lockable::SharedLock m;
auto it = const_cast<parallel_hash_map *>(this)->find(key, hash(key), m);
auto it = const_cast<parallel_hash_map *>(this)->find(key, Base::hash(key), m);
if (it == this->end())
return false;
v = Policy::value(&*it);
@@ -3411,7 +3411,7 @@ public:
template <class K = key_type, class F>
bool if_contains(const key_arg<K>& key, F&& f) const {
typename Lockable::SharedLock m;
auto it = const_cast<parallel_hash_map*>(this)->find(key, hash(key), m);
auto it = const_cast<parallel_hash_map*>(this)->find(key, Base::hash(key), m);
if (it == this->end())
return false;
std::forward<F>(f)(Policy::value(&*it));