FastLED
3.9.15
Loading...
Searching...
No Matches
◆
upper_bound()
[1/2]
template<typename
Key
, typename Value, typename Less = fl::less<Key>>
const_iterator
fl::flat_map
<
Key
, Value, Less >::upper_bound
(
const
Key
&
key
)
const
inline
Definition at line
220
of file
flat_map.h
.
220
{
221
// Binary search: find first element where key < element
222
const_iterator
first
=
mData
.begin();
223
size_type
count
=
mData
.size();
224
225
while
(
count
> 0) {
226
size_type
step
=
count
/ 2;
227
const_iterator
it
=
first
+
step
;
228
if
(!
mLess
(
key
,
it
->first)) {
229
first
=
it
+ 1;
230
count
-=
step
+ 1;
231
}
else
{
232
count
=
step
;
233
}
234
}
235
return
first
;
236
}
fl::flat_map::mLess
Less mLess
Definition
flat_map.h:52
fl::flat_map::count
size_type count(const Key &key) const FL_NOEXCEPT
Definition
flat_map.h:152
fl::flat_map::size_type
fl::size size_type
Definition
flat_map.h:36
fl::flat_map::const_iterator
typename vector_type::const_iterator const_iterator
Definition
flat_map.h:46
fl::flat_map::mData
vector_type mData
Definition
flat_map.h:51
fl::flat_map
Definition
flat_map.h:29
fl
flat_map
Generated on Tue Jun 16 2026 00:07:05 for FastLED by
1.13.2