FastLED 3.9.15
Loading...
Searching...
No Matches
functional.h
Go to the documentation of this file.
1#pragma once
2#include "fl/ptr.h"
3#include "fl/template_magic.h"
4
5namespace fl {
6
15template <typename T = void> struct less {
23 constexpr bool operator()(const T &lhs, const T &rhs) const {
24 return lhs < rhs;
25 }
26};
27
34template <> struct less<void> {
44 template <typename T, typename U>
45 constexpr auto operator()(T &&lhs, U &&rhs) const
46 -> decltype(fl::forward<T>(lhs) < fl::forward<U>(rhs)) {
47 return fl::forward<T>(lhs) < fl::forward<U>(rhs);
48 }
49};
50
51} // namespace fl
constexpr T && forward(typename remove_reference< T >::type &t) noexcept
Implements a simple red square effect for 2D LED grids.
Definition crgb.h:16
constexpr auto operator()(T &&lhs, U &&rhs) const -> decltype(fl::forward< T >(lhs)< fl::forward< U >(rhs))
Function call operator that performs the less-than comparison.
Definition functional.h:45
constexpr bool operator()(const T &lhs, const T &rhs) const
Function call operator that performs the less-than comparison.
Definition functional.h:23
Binary function object that returns whether the first argument is less than the second.
Definition functional.h:15