FastLED 3.10.9
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 313 of file basic_vector.h.

313 {
314 // Trivially copyable types use the fast path (mOps == nullptr)
316 return nullptr;
317 }
318
319 static constexpr vector_element_ops ops = {
320 detail::get_copy_construct_fn<T>(), // copy_construct
321 detail::get_move_construct_fn<T>(), // move_construct
322 detail::get_default_construct_fn<T>(), // default_construct
323 detail::get_swap_fn<T>(), // swap_elements
324 &detail::vector_destroy_n<T> // destroy_n
325 };
326 return &ops;
327}
constexpr fl::enable_if< has_default_ctor< T >::value, void(*)(void *)>::type get_default_construct_fn() FL_NO_EXCEPT
constexpr fl::enable_if< has_copy_ctor< T >::value, void(*)(void *, constvoid *)>::type get_copy_construct_fn() FL_NO_EXCEPT
constexpr fl::enable_if< is_swappable< T >::value, void(*)(void *, void *)>::type get_swap_fn() FL_NO_EXCEPT
constexpr fl::enable_if< has_move_ctor< T >::value, void(*)(void *, void *)>::type get_move_construct_fn() FL_NO_EXCEPT
void vector_destroy_n(void *first, fl::size count) 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(), fl::fl::is_trivially_copyable< T >::value, and fl::detail::vector_destroy_n().

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: