FastLED 3.10.8
Loading...
Searching...
No Matches
basic_vector.h File Reference

Detailed Description

Type-erased base class for fl::vector<T>.

All vector logic lives here, compiled once. vector<T> is a thin wrapper that provides type safety and sets up the element operations table. Follows the same pattern as basic_string + fl::string (concrete base + co-located inline buffer in the wrapper).

Definition in file basic_vector.h.

+ Include dependency graph for basic_vector.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fl::detail::has_copy_ctor< T, typename >
 
struct  fl::detail::has_copy_ctor< T, decltype(void(T(fl::declval< const T & >())))>
 
struct  fl::detail::has_default_ctor< T, typename >
 
struct  fl::detail::has_default_ctor< T, decltype(void(T()))>
 
struct  fl::detail::has_move_ctor< T, typename >
 
struct  fl::detail::has_move_ctor< T, decltype(void(T(fl::declval< T && >())))>
 
struct  fl::detail::is_swappable< T, typename >
 
struct  fl::detail::is_swappable< T, decltype(void(fl::declval< T & >()=fl::declval< T && >()))>
 
class  fl::vector_basic
 Type-erased vector base class. More...
 
struct  fl::vector_element_ops
 Function pointer table for type-specific element operations. More...
 

Namespaces

namespace  fl
 Base definition for an LED controller.
 
namespace  fl::detail
 Compile-time linker keep-alive hook for a single fl::Bus.
 

Functions

template<typename T>
fl::enable_if< has_copy_ctor< T >::value, void(*)(void *, constvoid *)>::type fl::detail::get_copy_construct_fn () FL_NO_EXCEPT
 
template<typename T>
fl::enable_if<!has_copy_ctor< T >::value, void(*)(void *, constvoid *)>::type fl::detail::get_copy_construct_fn () FL_NO_EXCEPT
 
template<typename T>
fl::enable_if< has_default_ctor< T >::value, void(*)(void *)>::type fl::detail::get_default_construct_fn () FL_NO_EXCEPT
 
template<typename T>
fl::enable_if<!has_default_ctor< T >::value, void(*)(void *)>::type fl::detail::get_default_construct_fn () FL_NO_EXCEPT
 
template<typename T>
fl::enable_if< has_move_ctor< T >::value, void(*)(void *, void *)>::type fl::detail::get_move_construct_fn () FL_NO_EXCEPT
 
template<typename T>
fl::enable_if<!has_move_ctor< T >::value, void(*)(void *, void *)>::type fl::detail::get_move_construct_fn () FL_NO_EXCEPT
 
template<typename T>
fl::enable_if< is_swappable< T >::value, void(*)(void *, void *)>::type fl::detail::get_swap_fn () FL_NO_EXCEPT
 
template<typename T>
fl::enable_if<!is_swappable< T >::value, void(*)(void *, void *)>::type fl::detail::get_swap_fn () FL_NO_EXCEPT
 
template<typename T>
const vector_element_ops * fl::vector_element_ops_for () FL_NO_EXCEPT
 Generate a static ops table for type T.
 

Class Documentation

◆ fl::vector_element_ops

struct fl::vector_element_ops
Class Members
void(*)(void *dst, const void *src) copy_construct
void(*)(void *ptr) default_construct
void(*)(void *first, fl::size count) destroy_n Destroy count elements starting at first (count == 1 for a single element: one destroy thunk per type instead of two, #4794).
void(*)(void *dst, void *src) move_construct
void(*)(void *a, void *b) swap_elements