FastLED 3.10.8
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 146 of file flat_map.h.

146 {
147 auto it = lower_bound(key);
148 if (it != end() && !mLess(key, it->first) && !mLess(it->first, key)) {
149 return it->second;
150 }
151 FASTLED_ASSERT(false, "Key not found in flat_map");
152 return mData.front().second; // unreachable
153 }
iterator lower_bound(const Key &key) FL_NO_EXCEPT
Definition flat_map.h:208
iterator end() FL_NO_EXCEPT
Definition flat_map.h:86
vector_type mData
Definition flat_map.h:53