41 template<
typename Src1,
typename Src2,
typename Dst1,
typename Dst2>
44 new ((
void *)dst1) Dst1(std::forward<Src1>(src1));
46 new ((
void *)dst2) Dst2(std::forward<Src2>(src2));
85 if (state_ == Occupied) {
86 key_buffer_.
ref().~Key();
87 value_buffer_.
ref().~Value();
97 state_ = other.state_;
98 if (other.state_ == Occupied) {
100 other.value_buffer_.
ref(),
102 value_buffer_.
ptr());
112 std::is_nothrow_move_constructible_v<Key> &&std::is_nothrow_move_constructible_v<Value>)
114 state_ = other.state_;
115 if (other.state_ == Occupied) {
117 std::move(other.value_buffer_.ref()),
119 value_buffer_.
ptr());
144 return value_buffer_;
152 return value_buffer_;
160 return state_ == Occupied;
168 return state_ == Empty;
178 return hash(*key_buffer_);
185 template<
typename ForwardKey,
typename IsEqual>
188 if (state_ == Occupied) {
189 return is_equal(
key, *key_buffer_);
198 template<
typename ForwardKey,
typename ForwardValue>
202 new (&value_buffer_)
Value(std::forward<ForwardValue>(
value));
215 new (&key_buffer_)
Key(std::forward<ForwardKey>(
key));
219 value_buffer_.
ref().~Value();
232 key_buffer_.
ref().~Key();
233 value_buffer_.
ref().~Value();
248 Key key_ = KeyInfo::get_empty();
256 if (KeyInfo::is_not_empty_or_removed(key_)) {
257 value_buffer_.
ref().~Value();
263 if (KeyInfo::is_not_empty_or_removed(key_)) {
264 new (&value_buffer_)
Value(*other.value_buffer_);
270 if (KeyInfo::is_not_empty_or_removed(key_)) {
271 new (&value_buffer_)
Value(std::move(*other.value_buffer_));
287 return value_buffer_;
292 return value_buffer_;
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_);
318 template<
typename ForwardKey,
typename ForwardValue>
323 new (&value_buffer_)
Value(std::forward<ForwardValue>(
value));
332 key_ = std::forward<ForwardKey>(
key);
335 value_buffer_.
ref().~Value();
343 value_buffer_.
ref().~Value();
344 KeyInfo::remove(key_);
348 template<
typename Key,
typename Value>
struct DefaultMapSlot;
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White Value
void occupy(ForwardKey &&key, ForwardValue &&value, uint64_t hash)
void occupy_no_value(ForwardKey &&key, uint64_t UNUSED(hash))
IntrusiveMapSlot(IntrusiveMapSlot &&other) noexcept
IntrusiveMapSlot(const IntrusiveMapSlot &other)
bool contains(const ForwardKey &key, const IsEqual &is_equal, uint64_t UNUSED(hash)) const
uint64_t get_hash(const Hash &hash)
IntrusiveMapSlot()=default
const Value * value() const
SimpleMapSlot(const SimpleMapSlot &other)
const Value * value() const
bool contains(const ForwardKey &key, const IsEqual &is_equal, uint64_t UNUSED(hash)) const
SimpleMapSlot(SimpleMapSlot &&other) noexcept(std::is_nothrow_move_constructible_v< Key > &&std::is_nothrow_move_constructible_v< Value >)
uint64_t get_hash(const Hash &hash)
void occupy(ForwardKey &&key, ForwardValue &&value, uint64_t hash)
void occupy_no_value(ForwardKey &&key, uint64_t UNUSED(hash))
void initialize_pointer_pair(Src1 &&src1, Src2 &&src2, Dst1 *dst1, Dst2 *dst2)
unsigned __int64 uint64_t