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

◆ lower_bound() [1/2]

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

Definition at line 184 of file flat_map.h.

184 {
185 // Binary search: find first element where !(element < key)
186 const_iterator first = mData.begin();
187 size_type count = mData.size();
188
189 while (count > 0) {
190 size_type step = count / 2;
192 if (mLess(it->first, key)) {
193 first = it + 1;
194 count -= step + 1;
195 } else {
196 count = step;
197 }
198 }
199 return first;
200 }
size_type count(const Key &key) const FL_NOEXCEPT
Definition flat_map.h:152
fl::size size_type
Definition flat_map.h:36
typename vector_type::const_iterator const_iterator
Definition flat_map.h:46
vector_type mData
Definition flat_map.h:51