ZXFoundation™ 26h2
Loading...
Searching...
No Matches
lib.queue Module Reference

Data Structures

class  lib::static_queue< T, N >
 A fixed-capacity FIFO queue (circular buffer). More...

Typedefs

using size_type = usize
using value_type = T

Functions

constexpr auto capacity () const noexcept -> size_type
 Returns the capacity of the queue.
constexpr auto clear () noexcept -> void
 Clears the queue.
constexpr auto empty () const noexcept -> bool
 Returns true if the queue is empty.
constexpr auto front () const noexcept -> std::optional< const T & >
 Returns the first element of the queue (const).
constexpr auto front () noexcept -> std::optional< T & >
 Returns the first element of the queue.
constexpr auto full () const noexcept -> bool
 Returns true if the queue is full.
constexpr auto pop () noexcept -> bool
 Removes the first element from the queue.
constexpr auto push (const T &value) noexcept -> bool
 Adds an element to the end of the queue.
constexpr auto push (T &&value) noexcept -> bool
 Adds an element to the end of the queue (move).
constexpr auto size () const noexcept -> size_type
 Returns the number of elements in the queue.

Files

file  lib/queue.cxxm
 Fixed-capacity FIFO queue implementation.