FastLED 3.10.8
Loading...
Searching...
No Matches

◆ insert() [1/3]

template<typename T>
iterator fl::deque< T >::insert ( const_iterator pos,
const T & value )
inline

Definition at line 705 of file deque.h.

705 {
706 fl::size idx = pos.mIndex;
707 if (idx == mSize) {
709 return iterator(this, idx);
710 }
711 // Push a copy of the current back to extend by one; chunk alloc
712 // is handled inside push_back.
713 push_back((*this)[mSize - 1]);
714 for (fl::size i = mSize - 1; i > idx + 1; --i) {
715 (*this)[i - 1] = fl::move((*this)[i - 2]);
716 }
717 (*this)[idx] = value;
718 return iterator(this, idx);
719 }
void push_back(const T &value) FL_NO_EXCEPT
Definition deque.h:602
fl::size mSize
Definition deque.h:42
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Definition s16x16x4.h:30