FastLED 3.9.15
Loading...
Searching...
No Matches

◆ operator->() [1/2]

template<typename Key, typename T, typename Hash = Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
pointer fl::HashMap< Key, T, Hash, KeyEqual, INLINED_COUNT >::iterator::operator-> ( )
inline

Definition at line 96 of file hash_map.h.

96 {
97 // Use reinterpret_cast since pair<const Key, T> and pair<Key, T> are different types
98 // but have the same memory layout, then destroy/reconstruct to avoid assignment issues
100 auto& mutable_cached = *reinterpret_cast<mutable_value_type*>(&_cached_value);
101 mutable_cached.~mutable_value_type();
102 new (&mutable_cached) mutable_value_type(operator*());
103 return &_cached_value;
104 }
value_type _cached_value
Definition hash_map.h:144

References _cached_value.