Fixed enable_if_t is a c++14 feature

This commit is contained in:
Brian McKinnon
2020-05-02 21:39:23 -05:00
parent 3bfc1784ad
commit 73b0e63445
+4 -4
View File
@@ -3394,8 +3394,8 @@ public:
}
template <class K = key_type, class V = mapped_type>
std::enable_if_t<std::is_assignable<mapped_type&, V>::value
, bool> if_contains(const key_arg<K>& key, V& v) const {
typename std::enable_if<std::is_assignable<mapped_type&, V>::value
, bool>::type if_contains(const key_arg<K>& key, V& v) const {
typename Lockable::SharedLock m;
auto it = const_cast<parallel_hash_map *>(this)->find(key, this->hash(key), m);
if (it == this->end())
@@ -3405,11 +3405,11 @@ public:
}
template <class K = key_type, class F>
std::enable_if_t<!std::is_assignable<mapped_type&, F>::value
typename std::enable_if<!std::is_assignable<mapped_type&, F>::value
#if __cplusplus >= 201703L
&& std::is_invocable<F, mapped_type&>::value
#endif
, bool> if_contains(const key_arg<K>& key, F&& f) const {
, bool>::type if_contains(const key_arg<K>& key, F&& f) const {
typename Lockable::SharedLock m;
auto it = const_cast<parallel_hash_map*>(this)->find(key, this->hash(key), m);
if (it == this->end())