mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-30 17:10:40 +08:00
Replace custom CompressedTuple with std::tuple.
This commit is contained in:
Vendored
+9
-10
@@ -2281,7 +2281,7 @@ private:
|
||||
growth_left() = CapacityToGrowth(capacity) - size_;
|
||||
}
|
||||
|
||||
size_t& growth_left() { return settings_.template get<0>(); }
|
||||
size_t& growth_left() { return std::get<0>(settings_); }
|
||||
|
||||
template <size_t N,
|
||||
template <class, class, class, class> class RefSet,
|
||||
@@ -2309,13 +2309,13 @@ private:
|
||||
// small tables.
|
||||
bool is_small() const { return capacity_ < Group::kWidth - 1; }
|
||||
|
||||
hasher& hash_ref() { return settings_.template get<1>(); }
|
||||
const hasher& hash_ref() const { return settings_.template get<1>(); }
|
||||
key_equal& eq_ref() { return settings_.template get<2>(); }
|
||||
const key_equal& eq_ref() const { return settings_.template get<2>(); }
|
||||
allocator_type& alloc_ref() { return settings_.template get<3>(); }
|
||||
hasher& hash_ref() { return std::get<1>(settings_); }
|
||||
const hasher& hash_ref() const { return std::get<1>(settings_); }
|
||||
key_equal& eq_ref() { return std::get<2>(settings_); }
|
||||
const key_equal& eq_ref() const { return std::get<2>(settings_); }
|
||||
allocator_type& alloc_ref() { return std::get<3>(settings_); }
|
||||
const allocator_type& alloc_ref() const {
|
||||
return settings_.template get<3>();
|
||||
return std::get<3>(settings_);
|
||||
}
|
||||
|
||||
// TODO(alkis): Investigate removing some of these fields:
|
||||
@@ -2326,9 +2326,8 @@ private:
|
||||
size_t size_ = 0; // number of full slots
|
||||
size_t capacity_ = 0; // total number of slots
|
||||
HashtablezInfoHandle infoz_;
|
||||
phmap::priv::CompressedTuple<size_t /* growth_left */, hasher,
|
||||
key_equal, allocator_type>
|
||||
settings_{0, hasher{}, key_equal{}, allocator_type{}};
|
||||
std::tuple<size_t /* growth_left */, hasher, key_equal, allocator_type>
|
||||
settings_{0, hasher{}, key_equal{}, allocator_type{}};
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user