21template <
typename T,
typename Deleter = Po
interDeleter<T>>
class scoped_ptr {
24 explicit scoped_ptr(T *ptr =
nullptr, Deleter deleter = Deleter())
62 explicit operator bool() const noexcept {
return ptr_ !=
nullptr; }
92template <
typename T,
typename Deleter = ArrayDeleter<T>>
class scoped_array {
108 other.arr_ =
nullptr;
114 if (
this != &other) {
116 other.arr_ =
nullptr;
128 explicit operator bool() const noexcept {
return arr_ !=
nullptr; }
void reset(T *arr=nullptr)
scoped_array & operator=(const scoped_array &)=delete
scoped_array(scoped_array &&other) noexcept
void swap(scoped_array &other) noexcept
bool operator!() const noexcept
T & operator[](size_t i) const
scoped_array(const scoped_array &)=delete
scoped_array(T *arr, Deleter deleter)
scoped_array & operator=(scoped_array &&other) noexcept
scoped_array(T *arr=nullptr)
void swap(scoped_ptr &other) noexcept
bool operator!() const noexcept
scoped_ptr(scoped_ptr &&other) noexcept
scoped_ptr(T *ptr=nullptr, Deleter deleter=Deleter())
scoped_ptr & operator=(const scoped_ptr &)=delete
void reset(T *ptr=nullptr)
scoped_ptr(const scoped_ptr &)=delete
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.