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

◆ at() [1/2]

template<typename Key, typename Value, typename Less = fl::less<Key>>
const Value & fl::flat_map< Key, Value, Less >::at ( const Key & key) const
inline

Definition at line 126 of file flat_map.h.

126 {
127 auto it = lower_bound(key);
128 if (it != end() && !mLess(key, it->first) && !mLess(it->first, key)) {
129 return it->second;
130 }
131 FASTLED_ASSERT(false, "Key not found in flat_map");
132 return mData.front().second; // unreachable
133 }
iterator lower_bound(const Key &key) FL_NOEXCEPT
Definition flat_map.h:166
iterator end() FL_NOEXCEPT
Definition flat_map.h:84
vector_type mData
Definition flat_map.h:51