FastLED
3.9.15
Loading...
Searching...
No Matches
◆
insert()
[1/2]
template<typename T, fl::size N>
bool
fl::FixedVector
< T, N >::insert
(
iterator
pos
,
const T &
value
)
inline
Definition at line
294
of file
vector.h
.
294
{
295
if
(
current_size
>=
N
) {
296
return
false
;
297
}
298
299
// Construct a new element at end() position using placement new
300
new
(
end
())
T
();
301
++
current_size
;
302
303
// Shift elements from [pos, end-1) to the right by one position
304
for
(
iterator
p
=
end
() - 1;
p
>
pos
; --
p
) {
305
*
p
=
fl::move
(*(
p
- 1));
306
}
307
308
// Assign the new value to the insertion position
309
*
pos
=
value
;
310
return
true
;
311
}
fl::FixedVector::end
iterator end() FL_NOEXCEPT
Definition
vector.h:395
fl::FixedVector::iterator
T * iterator
Definition
vector.h:96
fl::FixedVector::current_size
fl::size current_size
Definition
vector.h:439
fl::FixedVector
Definition
vector.h:86
fl::fl::move
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Definition
s16x16x4.h:28
fl
FixedVector
Generated on Tue Jun 16 2026 00:07:05 for FastLED by
1.13.2