18template <
typename T, T v>
54template <
bool Condition, typename T =
void> struct
enable_if {};
66template <
bool Condition,
typename T =
void>
70template <
typename Base,
typename Derived>
struct is_base_of {
92template <
typename T,
typename U>
struct is_same {
97template <
typename T>
struct is_same<T, T> {
111template <
typename T,
typename F>
struct conditional<false, T, F> {
115template <
bool B,
typename T,
typename F>
127template <
typename T, fl::size N>
struct is_array<T[N]> {
149template <
typename Ret,
typename... Args>
struct is_function<Ret(Args...)> {
153template <
typename Ret,
typename... Args>
158template <
typename Ret,
typename... Args>
163template <
typename Ret,
typename... Args>
233namespace adl_barrier {
237 return static_cast<T &&
>(
t);
244 "Cannot forward an rvalue as an lvalue");
245 return static_cast<T &&
>(
t);
263template <
typename T>
struct remove_cv<const volatile T> {
331#if defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER)
332 enum :
bool {
value = __is_enum(T) };
348template <>
struct is_pod<unsigned char> {
354template <>
struct is_pod<unsigned short> {
366template <>
struct is_pod<unsigned long> {
372template <>
struct is_pod<unsigned long long> {
395template <
typename C,
typename Ret,
typename... A>
397template <typename C, typename Ret, typename... A>
404template <
typename C,
typename Ret,
typename... A>
409template <
typename C,
typename Ret,
typename... A>
559 enum :
bool {
value = (char(-1) < char(0)) };
592template <
typename T>
struct is_signed<const volatile T> {
616template <
typename T,
typename Enable =
void>
620 "make_unsigned requires a non-bool integral type");
690template <
typename T,
typename U>
693 (
sizeof(T) >
sizeof(U)), T,
695 (
sizeof(U) >
sizeof(T)), U,
702template <
typename T,
typename U>
714template <
typename T,
typename U>
730template <
typename T,
typename U>
732 static constexpr bool same_size = (
sizeof(T) ==
sizeof(U));
799template <
typename T,
typename U>
803 !((is_same<T, i8>::value && is_same<U, u8>::value) ||
804 (is_same<T, u8>::value && is_same<U, i8>::value))
821template <
typename T,
typename U>
837template <
typename Base,
typename Derived>
851 template <
typename U,
void (U::*M)(U &)>
struct helper {};
888template <
typename T,
typename U>
910template <
typename T,
typename U,
typename... Rest>
923template <
typename T,
typename... Rest>
struct max_size<T, Rest...> {
938template <
typename T,
typename... Rest>
struct max_align<T, Rest...> {
949 enum : fl::size {
value =
alignof(T) };
955#if defined(__GNUC__) || defined(__clang__)
957template <
typename T>
struct is_enum {
958 enum :
bool { value = __is_enum(T) };
960#elif defined(_MSC_VER)
962template <
typename T>
struct is_enum {
963 enum :
bool { value = __is_enum(T) };
977#if defined(__GNUC__) || defined(__clang__)
979template <
typename T>
struct is_trivially_copyable {
980 enum :
bool { value = __is_trivially_copyable(T) };
982#elif defined(_MSC_VER)
984template <
typename T>
struct is_trivially_copyable {
985 enum :
bool { value = __is_trivially_copyable(T) };
1003#if defined(__GNUC__) || defined(__clang__)
1006 using type = __underlying_type(T);
1008#elif defined(_MSC_VER) && _MSC_VER >= 1900
1010template <
typename T>
struct underlying_type {
1011 using type = __underlying_type(T);
1020template <
typename T>
1033#define FASTLED_DEFINE_POD_COMPARISON_OPERATOR(CLASS, OP) \
1034 template <typename T, typename U> \
1035 typename enable_if< \
1036 is_same<U, CLASS>::value && is_pod<T>::value, bool>::type \
1037 operator OP(const T &pod, const CLASS &obj) FL_NO_EXCEPT { \
1038 return pod OP obj; \
1040 template <typename T> \
1041 typename enable_if<is_pod<T>::value, bool>::type operator OP( \
1042 const CLASS &obj, const T &pod) FL_NO_EXCEPT { \
1043 return obj OP pod; \
1054 template<
typename T, fl::size Size = sizeof(T),
bool IsSigned = fl::is_
signed<T>::value>
1120template <
typename T,
typename =
void>
1124template <
typename C,
typename R,
typename... Args>
1128 static constexpr fl::size
arity =
sizeof...(Args);
1132template <
typename C,
typename R,
typename... Args>
1136 static constexpr fl::size
arity =
sizeof...(Args);
1140template <
typename R,
typename... Args>
1144 static constexpr fl::size
arity =
sizeof...(Args);
1148template <
typename R,
typename... Args>
1152 static constexpr fl::size
arity =
sizeof...(Args);
1157template <
typename T>
1166template <fl::size... Is>
1179template <
typename LhsSeq,
typename RhsSeq>
1182template <fl::size... Lhs, fl::size... Rhs>
1187template <fl::size N>
1204template <fl::size N>
Keeps fl's generic templates out of argument-dependent lookup (ADL).
#define constexpr
Declares that it is possible to evaluate a value at compile time, introduced in C++11.
constexpr T && forward(typename remove_reference< T >::type &t) FL_NO_EXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
typename fl::conditional< IsSigned, typename fl::conditional< Size==1, fl::i8, typename fl::conditional< Size==2, fl::i16, typename fl::conditional< Size==4, fl::i32, typename fl::conditional< Size==8, fl::i64, fl::i64 >::type >::type >::type >::type, typename fl::conditional< Size==1, fl::u16, typename fl::conditional< Size==2, fl::u16, typename fl::conditional< Size==4, fl::u32, typename fl::conditional< Size==8, fl::u64, fl::u64 >::type >::type >::type >::type >::type type
void swap(array< T, N > &lhs, array< T, N > &rhs) FL_NO_EXCEPT
typename common_type< T, U >::type common_type_t
u8 u8 fract8 blur_amount FL_NO_EXCEPT
typename underlying_type< T >::type underlying_type_t
constexpr int type_rank< T >::value
typename conditional< B, T, F >::type conditional_t
void swap_by_copy(T &a, T &b) FL_NO_EXCEPT
typename remove_cv< T >::type remove_cv_t
add_rvalue_reference< T >::type declval() FL_NO_EXCEPT
integral_constant< bool, false > false_type
integral_constant< bool, B > bool_constant
typename remove_pointer< T >::type remove_pointer_t
typename decay< T >::type decay_t
enable_if_t< is_base_of< Base, Derived >::value > is_derived
typename add_pointer< T >::type add_pointer_t
typename make_index_sequence_impl< N >::type make_index_sequence
typename enable_if< Condition, T >::type enable_if_t
integral_constant< bool, true > true_type
Base definition for an LED controller.
index_sequence< Lhs...,(sizeof...(Lhs)+Rhs)... > type
typename conditional<(sizeof(T) > sizeof(U)), T, typename conditional<(sizeof(U) > sizeof(T)), U, void >::type >::type type
typename common_type_impl< T, U >::type type
typename conditional<(type_rank< T >::value > type_rank< U >::value), T, typename conditional<(type_rank< U >::value > type_rank< T >::value), U, void >::type >::type type
typename index_sequence_concat< typename make_index_sequence_impl< N/2 >::type, typename make_index_sequence_impl< N - N/2 >::type >::type type
typename integer_promotion_impl< T, U >::type type
#define FL_STATIC_ASSERT(...)
Portable compile-time assertion wrapper.
static constexpr fl::size arity
static constexpr fl::size arity
static constexpr fl::size arity
static constexpr fl::size arity
static constexpr bool t_signed
static constexpr bool u_signed
typename conditional< mixed_signedness &&t_signed, T, typename conditional< mixed_signedness &&u_signed, U, T >::type >::type type
static constexpr bool mixed_signedness
static constexpr bool value
typename remove_reference< T >::type U
typename conditional< is_array< U >::value, typename remove_extent< U >::type *, typename conditional< is_function< U >::value, typename add_pointer< U >::type, typename remove_cv< U >::type >::type >::type type
static no test(...) FL_NO_EXCEPT
static constexpr bool value
static yes test(helper< U, &U::swap > *) FL_NO_EXCEPT
static constexpr fl::size size() FL_NO_EXCEPT
constexpr value_type operator()() const FL_NO_EXCEPT
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static no test(...) FL_NO_EXCEPT
static yes test(Base *) FL_NO_EXCEPT
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
typename make_unsigned_detail::unsigned_by_size< sizeof(T)>::type type
FL_STATIC_ASSERT(is_integral< T >::value &&!is_same< typename remove_cv< T >::type, bool >::value, "make_unsigned requires a non-bool integral type")
static void apply(T &a, T &b) FL_NO_EXCEPT
static void apply(T &a, T &b) FL_NO_EXCEPT
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value
static constexpr int value