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

◆ vector_element_ops_for()

template<typename T>
const vector_element_ops * fl::vector_element_ops_for ( )

Generate a static ops table for type T.

Returns nullptr for trivially copyable types (fast path).

Definition at line 291 of file basic_vector.h.

291 {
292 // Trivially copyable types use the fast path (mOps == nullptr)
294 return nullptr;
295 }
296
297 static const vector_element_ops ops = {
298 detail::get_copy_construct_fn<T>(), // copy_construct
299 detail::get_move_construct_fn<T>(), // move_construct
300 detail::get_default_construct_fn<T>(), // default_construct
301 detail::get_swap_fn<T>(), // swap_elements
302 // destroy_n
303 [](void* first, fl::size count) FL_NO_EXCEPT {
304 T* p = static_cast<T*>(first);
305 for (fl::size i = 0; i < count; ++i) {
306 p[i].~T();
307 }
308 }
309 };
310 return &ops;
311}
fl::enable_if< has_default_ctor< T >::value, void(*)(void *)>::type get_default_construct_fn() FL_NO_EXCEPT
fl::enable_if< has_move_ctor< T >::value, void(*)(void *, void *)>::type get_move_construct_fn() FL_NO_EXCEPT
fl::enable_if< is_swappable< T >::value, void(*)(void *, void *)>::type get_swap_fn() FL_NO_EXCEPT
fl::enable_if< has_copy_ctor< T >::value, void(*)(void *, constvoid *)>::type get_copy_construct_fn() FL_NO_EXCEPT
#define FL_NO_EXCEPT

References FL_NO_EXCEPT, fl::detail::get_copy_construct_fn(), fl::detail::get_default_construct_fn(), fl::detail::get_move_construct_fn(), fl::detail::get_swap_fn(), and fl::fl::is_trivially_copyable< T >::value.

Referenced by fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), fl::vector< fl::i16 >::vector(), and fl::vector< fl::i16 >::vector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: