43 template<
typename... Args>
85 template<
typename... Args>
164template <
typename T, fl::size N = 0>
196 mCore.setHead(other.mCore.head());
197 mCore.setTail(other.mCore.tail());
198 mCore.setFull(other.mCore.isFull());
204 mCore.setHead(other.mCore.head());
205 mCore.setTail(other.mCore.tail());
206 mCore.setFull(other.mCore.isFull());
207 other.mCore.assign(
nullptr, 0);
211 if (
this != &other) {
214 mCore.setHead(other.mCore.head());
215 mCore.setTail(other.mCore.tail());
216 mCore.setFull(other.mCore.isFull());
222 if (
this != &other) {
225 mCore.setHead(other.mCore.head());
226 mCore.setTail(other.mCore.tail());
227 mCore.setFull(other.mCore.isFull());
228 other.mCore.assign(
nullptr, 0);
237 template<
typename... Args>
240 template<
typename... Args>
264 fl::size count =
mCore.size();
265 fl::size to_save = (count < new_capacity) ? count : new_capacity;
268 saved.resize(to_save);
269 for (fl::size i = 0; i < to_save; ++i) {
276 for (fl::size i = 0; i < to_save; ++i) {
277 mCore.push_back(saved[i]);
283 if (
size() != other.
size())
return false;
284 for (fl::size i = 0; i <
size(); ++i) {
292 return !(*
this == other);
298 for (fl::size i = 0; i < min_size; ++i) {
307 return *
this < other || *
this == other;
312 return other < *
this;
317 return other <= *
this;
bool emplace_back(Args &&... args)
fl::size decrement(fl::size index) const
bool pop_back(T *dst=nullptr)
bool push_front(const T &value)
void assign(T *data, fl::size capacity)
const T & operator[](fl::size index) const
bool push_back(const T &value)
T & operator[](fl::size index)
bool pop_front(T *dst=nullptr)
fl::size increment(fl::size index) const
circular_buffer_core() FL_NOEXCEPT
circular_buffer_core(T *data, fl::size capacity)
bool emplace_front(Args &&... args)
fl::size capacity() const
void push(const T &value)
bool operator<(const circular_buffer &other) const
Lexicographic comparison.
circular_buffer_core< T > mCore
bool pop_back(T *dst=nullptr)
void resize(fl::size new_capacity)
bool push_front(const T &value)
fl::size capacity() const
bool operator!=(const circular_buffer &other) const
Inequality comparison.
circular_buffer(const circular_buffer &other) FL_NOEXCEPT
circular_buffer & operator=(circular_buffer &&other) FL_NOEXCEPT
circular_buffer(memory_resource *resource)
bool push_back(const T &value)
memory_resource * get_memory_resource() const
bool operator>=(const circular_buffer &other) const
Greater-than-or-equal comparison.
bool operator==(const circular_buffer &other) const
Equality comparison.
circular_buffer() FL_NOEXCEPT
circular_buffer & operator=(const circular_buffer &other) FL_NOEXCEPT
bool operator>(const circular_buffer &other) const
Greater-than comparison.
T & operator[](fl::size index)
vector_inlined< T,(N > 0 ? N :1)> mStorage
circular_buffer(fl::size capacity, memory_resource *resource)
circular_buffer(fl::size capacity)
bool pop_front(T *dst=nullptr)
bool operator<=(const circular_buffer &other) const
Less-than-or-equal comparison.
bool emplace_front(Args &&... args)
bool emplace_back(Args &&... args)
circular_buffer(circular_buffer &&other) FL_NOEXCEPT
const T & operator[](fl::size index) const
Polymorphic memory resource base class (PMR-style).
PMR-style polymorphic memory resource for type-erased allocation.
constexpr T && forward(typename remove_reference< T >::type &t) FL_NOEXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
constexpr int type_rank< T >::value
VectorN< T, INLINED_SIZE > vector_inlined
Base definition for an LED controller.