diff --git a/parallel_hashmap/phmap.h b/parallel_hashmap/phmap.h index b89393e..0a38a7d 100644 --- a/parallel_hashmap/phmap.h +++ b/parallel_hashmap/phmap.h @@ -3394,8 +3394,8 @@ public: } template - std::enable_if_t::value, - bool> if_contains(const key_arg& key, V& v) const { + std::enable_if_t::value + , bool> if_contains(const key_arg& key, V& v) const { typename Lockable::SharedLock m; auto it = const_cast(this)->find(key, this->hash(key), m); if (it == this->end()) @@ -3405,8 +3405,11 @@ public: } template - std::enable_if_t::value && std::is_invocable::value, - bool> if_contains(const key_arg& key, F&& f) const { + std::enable_if_t::value +#if __cplusplus >= 201703L + && std::is_invocable::value +#endif + , bool> if_contains(const key_arg& key, F&& f) const { typename Lockable::SharedLock m; auto it = const_cast(this)->find(key, this->hash(key), m); if (it == this->end())