19template <
typename T, T v>
46template <
bool Condition, typename T =
void> struct
enable_if {};
58template <
bool Condition,
typename T =
void>
62template <
typename Base,
typename Derived>
struct is_base_of {
83template <
typename T,
typename U>
struct is_same {
84 static constexpr bool value =
false;
88template <
typename T>
struct is_same<T, T> {
89 static constexpr bool value =
true;
103template <
typename T,
typename F>
struct conditional<false, T, F> {
107template <
bool B,
typename T,
typename F>
112 static constexpr bool value =
false;
119template <
typename T, fl::size N>
struct is_array<T[N]> {
138 static constexpr bool value =
false;
141template <
typename Ret,
typename... Args>
struct is_function<Ret(Args...)> {
145template <
typename Ret,
typename... Args>
150template <
typename Ret,
typename... Args>
155template <
typename Ret,
typename... Args>
186 static constexpr bool value =
false;
195 static constexpr bool value =
false;
204 static constexpr bool value =
false;
214 return static_cast<T &&
>(
t);
221 "Cannot forward an rvalue as an lvalue");
222 return static_cast<T &&
>(
t);
238template <
typename T>
struct remove_cv<const volatile T> {
261 static constexpr bool value =
false;
274template <>
struct is_pod<unsigned char> {
280template <>
struct is_pod<unsigned short> {
292template <>
struct is_pod<unsigned long> {
298template <>
struct is_pod<unsigned long long> {
321template <
typename C,
typename Ret,
typename... A>
323template <typename C, typename Ret, typename... A>
327 static constexpr bool value =
false;
330template <
typename C,
typename Ret,
typename... A>
335template <
typename C,
typename Ret,
typename... A>
344 static constexpr bool value =
false;
399 static constexpr bool value =
false;
427 static constexpr bool value =
false;
515template <
typename T,
typename U>
518 (
sizeof(T) >
sizeof(U)), T,
520 (
sizeof(U) >
sizeof(T)), U,
527template <
typename T,
typename U>
539template <
typename T,
typename U>
555template <
typename T,
typename U>
557 static constexpr bool same_size = (
sizeof(T) ==
sizeof(U));
624template <
typename T,
typename U>
628 !((is_same<T, i8>::value && is_same<U, u8>::value) ||
629 (is_same<T, u8>::value && is_same<U, i8>::value))
646template <
typename T,
typename U>
662template <
typename Base,
typename Derived>
676 template <
typename U,
void (U::*M)(U &)>
struct helper {};
689template <typename T, bool = has_member_swap<T>::value>
struct swap_impl;
702 static void apply(T &a, T &b) { a.swap(b); }
706template <
typename T>
void swap(T &a, T &b) {
723 static constexpr bool value =
false;
726template <
typename T,
typename U,
typename... Rest>
736 static constexpr fl::size
value = 0;
739template <
typename T,
typename... Rest>
struct max_size<T, Rest...> {
749 static constexpr fl::size
value = 1;
752template <
typename T,
typename... Rest>
struct max_align<T, Rest...> {
761 static constexpr fl::size
value =
alignof(T);
775#define FASTLED_DEFINE_POD_COMPARISON_OPERATOR(CLASS, OP) \
776 template <typename T, typename U> \
777 typename fl::enable_if< \
778 fl::is_same<U, CLASS>::value && fl::is_pod<T>::value, bool>::type \
779 operator OP(const T &pod, const CLASS &obj) { \
782 template <typename T> \
783 typename fl::enable_if<fl::is_pod<T>::value, bool>::type operator OP( \
784 const CLASS &obj, const T &pod) { \
Implements the FastLED namespace macros.
constexpr remove_reference< T >::type && move(T &&t) noexcept
typename common_type< T, U >::type common_type_t
typename conditional< B, T, F >::type conditional_t
void swap(array< T, N > &lhs, array< T, N > &rhs) noexcept(noexcept(lhs.swap(rhs)))
typename remove_cv< T >::type remove_cv_t
integral_constant< bool, false > false_type
typename decay< T >::type decay_t
enable_if_t< is_base_of< Base, Derived >::value > is_derived
add_rvalue_reference< T >::type declval() noexcept
void swap_by_copy(T &a, T &b)
typename add_pointer< T >::type add_pointer_t
typename enable_if< Condition, T >::type enable_if_t
integral_constant< bool, true > true_type
constexpr T && forward(typename remove_reference< T >::type &t) noexcept
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 integer_promotion_impl< T, U >::type type
static constexpr fl::size value
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
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 yes test(helper< U, &U::swap > *)
static constexpr bool value
static constexpr bool value
constexpr value_type operator()() const noexcept
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
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
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
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
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
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 fl::size value
static constexpr fl::size value
static constexpr fl::size value
static constexpr fl::size value
static void apply(T &a, T &b)
static void apply(T &a, T &b)
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