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

◆ insert()

template<typename T, size_t N>
bool fl::FixedVector< T, N >::insert ( iterator pos,
const T & value )
inline

Definition at line 155 of file vector.h.

155 {
156 if (current_size < N) {
157 // shift all elements to the right
158 for (iterator p = end(); p != pos; --p) {
159 new (p) T(*(p - 1)); // Use copy constructor instead of std::move
160 (p - 1)->~T();
161 }
162 new (pos) T(value);
163 ++current_size;
164 return true;
165 }
166 return false;
167 }
size_t current_size
Definition vector.h:25
iterator end()
Definition vector.h:210