Fix for issue #128?

This commit is contained in:
greg
2022-02-05 21:39:20 -05:00
parent dab73d4b0e
commit 7970234626
+9 -9
View File
@@ -2647,15 +2647,7 @@ public:
std::is_nothrow_default_constructible<key_equal>::value&&
std::is_nothrow_default_constructible<allocator_type>::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<i...>) : 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,