26template <
typename T,
typename Deleter = Po
interDeleter<T>>
30 explicit scoped_ptr(T *ptr =
nullptr, Deleter deleter = Deleter())
68 explicit operator bool() const noexcept {
return ptr_ !=
nullptr; }
92template <
typename T,
typename Deleter=ArrayDeleter<T>>
class scoped_array {
107 other.arr_ =
nullptr;
113 if (
this != &other) {
115 other.arr_ =
nullptr;
127 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
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)
scoped_ptr & operator=(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.