mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 16:40:39 +08:00
Fixed enable_if_t is a c++14 feature
This commit is contained in:
Vendored
+4
-4
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user