FastLED
3.9.15
Loading...
Searching...
No Matches
◆
emplace()
template<typename T>
template<typename... Args>
iterator
fl::deque
< T >::emplace
(
const_iterator
pos
,
Args &&...
args
)
inline
Definition at line
689
of file
deque.h
.
689
{
690
fl::size
index
=
pos
.mIndex;
691
ensure_capacity
(
mSize
+ 1);
692
693
// Shift elements from pos to end one position to the right
694
for
(
fl::size
i
=
mSize
;
i
>
index
; --
i
) {
695
fl::size
from_idx
=
get_index
(
i
- 1);
696
fl::size
to_idx
=
get_index
(
i
);
697
new
(&
mData
[
to_idx
])
T
(
fl::move
(
mData
[
from_idx
]));
698
mData
[
from_idx
].~T();
699
}
700
701
// Construct new element in place
702
fl::size
emplace_idx
=
get_index
(
index
);
703
new
(&
mData
[
emplace_idx
])
T
(
fl::forward<Args>
(
args
)...);
704
++
mSize
;
705
706
return
iterator
(
this
,
index
);
707
}
fl::deque::iterator
Definition
deque.h:61
fl::deque::mSize
fl::size mSize
Definition
deque.h:18
fl::deque::ensure_capacity
void ensure_capacity(fl::size min_capacity)
Definition
deque.h:24
fl::deque::get_index
fl::size get_index(fl::size logical_index) const
Definition
deque.h:55
fl::deque::mData
T * mData
Definition
deque.h:16
fl::deque
Definition
deque.h:14
fl
deque
Generated on Tue Jun 16 2026 00:07:05 for FastLED by
1.13.2