FastLED 3.9.15
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 *) FL_NOEXCEPT >::type fl::detail::get_copy_construct_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if<!has_copy_ctor< T >::value, void(*)(void *, constvoid *) FL_NOEXCEPT >::type fl::detail::get_copy_construct_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if< has_default_ctor< T >::value, void(*)(void *) FL_NOEXCEPT >::type fl::detail::get_default_construct_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if<!has_default_ctor< T >::value, void(*)(void *) FL_NOEXCEPT >::type fl::detail::get_default_construct_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if< has_move_ctor< T >::value, void(*)(void *, void *) FL_NOEXCEPT >::type fl::detail::get_move_construct_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if<!has_move_ctor< T >::value, void(*)(void *, void *) FL_NOEXCEPT >::type fl::detail::get_move_construct_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if< is_swappable< T >::value, void(*)(void *, void *) FL_NOEXCEPT >::type fl::detail::get_swap_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if<!is_swappable< T >::value, void(*)(void *, void *) FL_NOEXCEPT >::type fl::detail::get_swap_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if< has_move_ctor< T >::value, void(*)(void *, void *, fl::size) FL_NOEXCEPT >::type fl::detail::get_uninitialized_move_n_fn () FL_NOEXCEPT
 
template<typename T>
fl::enable_if<!has_move_ctor< T >::value, void(*)(void *, void *, fl::size) FL_NOEXCEPT >::type fl::detail::get_uninitialized_move_n_fn () FL_NOEXCEPT
 
template<typename T>
const vector_element_opsfl::vector_element_ops_for () FL_NOEXCEPT
 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 *ptr) destroy
void(*)(void *first, fl::size count) destroy_n Destroy count elements starting at first.
void(*)(void *dst, void *src) move_construct
void(*)(void *a, void *b) swap_elements
void(*)(void *dst, void *src, fl::size count) uninitialized_move_n Move-construct count elements from src to dst (non-overlapping, dst uninitialized).