diff --git a/parallel_hashmap/phmap.h b/parallel_hashmap/phmap.h index 9900598..a209016 100644 --- a/parallel_hashmap/phmap.h +++ b/parallel_hashmap/phmap.h @@ -2647,15 +2647,7 @@ public: std::is_nothrow_default_constructible::value&& std::is_nothrow_default_constructible::value) {} -#if 1 - explicit parallel_hash_set(size_t bucket_cnt, - const hasher& hash_param = hasher(), - const key_equal& eq = key_equal(), - const allocator_type& alloc = allocator_type()) { - for (auto& inner : sets_) - inner.set_ = EmbeddedSet(bucket_cnt / N, hash_param, eq, alloc); - } -#else +#if __cplusplus >= 201703L && (defined(_MSC_VER) || defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 6)) explicit parallel_hash_set(size_t bucket_cnt, const hasher& hash_param = hasher(), const key_equal& eq = key_equal(), @@ -2668,6 +2660,14 @@ public: parallel_hash_set(typename Inner::Params const &p, phmap::index_sequence) : sets_{((void)i, p)...} {} +#else + explicit parallel_hash_set(size_t bucket_cnt, + const hasher& hash_param = hasher(), + const key_equal& eq = key_equal(), + const allocator_type& alloc = allocator_type()) { + for (auto& inner : sets_) + inner.set_ = EmbeddedSet(bucket_cnt / N, hash_param, eq, alloc); + } #endif parallel_hash_set(size_t bucket_cnt,