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) {
150 new (&key_buffer_)
Key(std::forward<ForwardKey>(
key));
160 key_buffer_.ref().~Key();
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) {
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>
319 if (KeyInfo::is_not_empty_or_removed(key_)) {
330 key_ = std::forward<ForwardKey>(
key);
336 KeyInfo::remove(key_);
344template<
typename Int, Int EmptyValue, Int RemovedValue>
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)
bool is_equal(float a, float b, const float epsilon)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
unsigned __int64 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