FastLED 3.9.15
Loading...
Searching...
No Matches
move.h
Go to the documentation of this file.
1#pragma once
2#include "fl/stl/noexcept.h"
3
4namespace fl {
5
6
7// Define remove_reference trait
8template <typename T> struct remove_reference {
9 using type = T;
10};
11
12// Specialization for lvalue reference
13template <typename T> struct remove_reference<T &> {
14 using type = T;
15};
16
17// Specialization for rvalue reference
18template <typename T> struct remove_reference<T &&> {
19 using type = T;
20};
21
22// Helper alias template for remove_reference
23template <typename T>
25
26// Implementation of move
27template <typename T>
28constexpr typename remove_reference<T>::type &&move(T &&t) FL_NOEXCEPT {
29 return static_cast<typename remove_reference<T>::type &&>(t);
30}
31
32} // namespace fl
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Definition move.h:28
typename remove_reference< T >::type remove_reference_t
Definition move.h:24
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NOEXCEPT