69 if (state_ == Occupied) {
70 key_buffer_.
ref().~Key();
80 state_ = other.state_;
81 if (other.state_ == Occupied) {
82 new (&key_buffer_)
Key(*other.key_buffer_);
93 state_ = other.state_;
94 if (other.state_ == Occupied) {
95 new (&key_buffer_)
Key(std::move(*other.key_buffer_));
120 return state_ == Occupied;
128 return state_ == Empty;
138 return hash(*key_buffer_);
145 template<
typename ForwardKey,
typename IsEqual>
148 if (state_ == Occupied) {
149 return is_equal(
key, *key_buffer_);
161 new (&key_buffer_)
Key(std::forward<ForwardKey>(
key));
171 key_buffer_.
ref().~Key();
200 if (state_ == Occupied) {
201 key_buffer_.
ref().~Key();
207 state_ = other.state_;
208 if (other.state_ == Occupied) {
210 new (&key_buffer_)
Key(*other.key_buffer_);
216 state_ = other.state_;
217 if (other.state_ == Occupied) {
219 new (&key_buffer_)
Key(std::move(*other.key_buffer_));
235 return state_ == Occupied;
240 return state_ == Empty;
249 template<
typename ForwardKey,
typename IsEqual>
254 if (state_ == Occupied) {
255 return is_equal(
key, *key_buffer_);
264 new (&key_buffer_)
Key(std::forward<ForwardKey>(
key));
272 key_buffer_.
ref().~Key();
287 Key key_ = KeyInfo::get_empty();
308 return KeyInfo::is_not_empty_or_removed(key_);
313 return KeyInfo::is_empty(key_);
322 template<
typename ForwardKey,
typename IsEqual>
326 return is_equal(key_,
key);
333 key_ = std::forward<ForwardKey>(
key);
339 KeyInfo::remove(key_);
347 template<
typename Int, Int EmptyValue, Int RemovedValue>
HashedSetSlot(HashedSetSlot &&other) noexcept(std::is_nothrow_move_constructible_v< Key >)
uint64_t get_hash(const Hash &UNUSED(hash)) const
bool contains(const ForwardKey &key, const IsEqual &is_equal, const uint64_t hash) const
void occupy(ForwardKey &&key, const uint64_t hash)
HashedSetSlot(const HashedSetSlot &other)
IntrusiveSetSlot()=default
uint64_t get_hash(const Hash &hash) const
IntrusiveSetSlot(IntrusiveSetSlot &&other) noexcept(std::is_nothrow_move_constructible_v< Key >)=default
void occupy(ForwardKey &&key, const uint64_t UNUSED(hash))
IntrusiveSetSlot(const IntrusiveSetSlot &other)=default
bool contains(const ForwardKey &key, const IsEqual &is_equal, const uint64_t UNUSED(hash)) const
~IntrusiveSetSlot()=default
bool contains(const ForwardKey &key, const IsEqual &is_equal, uint64_t UNUSED(hash)) const
SimpleSetSlot(SimpleSetSlot &&other) noexcept(std::is_nothrow_move_constructible_v< Key >)
uint64_t get_hash(const Hash &hash) const
SimpleSetSlot(const SimpleSetSlot &other)
void occupy(ForwardKey &&key, uint64_t UNUSED(hash))
unsigned __int64 uint64_t