35 enum State : uint8_t {
58 if (state_ == Occupied) {
59 key_buffer_.ref().~Key();
69 state_ = other.state_;
70 if (other.state_ == Occupied) {
71 new (&key_buffer_)
Key(*other.key_buffer_);
82 state_ = other.state_;
83 if (other.state_ == Occupied) {
84 new (&key_buffer_)
Key(std::move(*other.key_buffer_));
109 return state_ == Occupied;
117 return state_ == Empty;
127 return hash(*key_buffer_);
134 template<
typename ForwardKey,
typename IsEqual>
137 if (state_ == Occupied) {
138 return is_equal(
key, *key_buffer_);
150 new (&key_buffer_)
Key(std::forward<ForwardKey>(
key));
160 key_buffer_.
ref().~Key();
171 enum State : uint8_t {
189 if (state_ == Occupied) {
190 key_buffer_.ref().~Key();
196 state_ = other.state_;
197 if (other.state_ == Occupied) {
199 new (&key_buffer_)
Key(*other.key_buffer_);
205 state_ = other.state_;
206 if (other.state_ == Occupied) {
208 new (&key_buffer_)
Key(std::move(*other.key_buffer_));
224 return state_ == Occupied;
229 return state_ == Empty;
238 template<
typename ForwardKey,
typename IsEqual>
243 if (state_ == Occupied) {
244 return is_equal(
key, *key_buffer_);
253 new (&key_buffer_)
Key(std::forward<ForwardKey>(
key));
261 key_buffer_.
ref().~Key();
276 Key key_ = KeyInfo::get_empty();
297 return KeyInfo::is_not_empty_or_removed(key_);
302 return KeyInfo::is_empty(key_);
311 template<
typename ForwardKey,
typename IsEqual>
315 return is_equal(key_,
key);
322 key_ = std::forward<ForwardKey>(
key);
328 KeyInfo::remove(key_);
336template<
typename Int, Int EmptyValue, Int RemovedValue>
unsigned long long int uint64_t
HashedSetSlot(HashedSetSlot &&other) noexcept(std::is_nothrow_move_constructible_v< Key >)
uint64_t get_hash(const 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
IntrusiveSetSlot(const IntrusiveSetSlot &other)=default
void occupy(ForwardKey &&key, const uint64_t)
bool contains(const ForwardKey &key, const IsEqual &is_equal, const uint64_t) const
~IntrusiveSetSlot()=default
bool contains(const ForwardKey &key, const IsEqual &is_equal, uint64_t) 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)
IntrusiveSetSlot< Int, TemplatedKeyInfo< Int, EmptyValue, RemovedValue > > IntegerSetSlot
IntrusiveSetSlot< Key *, PointerKeyInfo< Key * > > type
HashedSetSlot< StringRefNull > type
HashedSetSlot< StringRef > type
HashedSetSlot< std::string > type
SimpleSetSlot< Key > type