76 template<Type::SafeValue T>
99 std::queue<T> copy(values);
100 while (!copy.empty()) {
101 push(std::move(copy.front()));
112 while (!values.empty()) {
113 push(std::move(values.front()));
137 template<std::ranges::input_range R>
138 requires std::convertible_to<std::ranges::range_reference_t<R>, T>
183 Queue replacement(values);
195 Queue replacement(std::move(values));
296 template<
std::ranges::input_range R>
297 requires
std::convertible_to<
std::ranges::range_reference_t<R>, T>
299 for (
auto&& value : range)
300 push(T(std::forward<
decltype(value)>(value)));
310 template<
class... Args>
359 bool operator<(
const Queue& other)
const requires requires(
const T& left,
const T& right) { left < right; };
366 bool operator<=(
const Queue& other)
const requires requires(
const T& left,
const T& right) { left < right; };
373 bool operator>(
const Queue& other)
const requires requires(
const T& left,
const T& right) { left < right; };
380 bool operator>=(
const Queue& other)
const requires requires(
const T& left,
const T& right) { left < right; };
387 std::queue<T> exported;
388 for (
const T& value : *
this)
389 exported.push(value);
403 template<Type::SafeValue T>
418 template<SafeValue T>
419 requires IsSafe<T>::value
426 template<SafeValue T>
434 template<SafeValue T>
441 template<SafeValue T>
FIFO sequence stored on Base's heap.
Definition queue.hxx:77
const_iterator cend() const noexcept
Return the read-only end iterator.
bool operator==(const Queue &other) const
Compare elements in FIFO order.
Size size_type
Element count. Size, not std::size_t.
Definition queue.hxx:81
iterator erase(const_iterator position)
Erase one element.
size_type size() const noexcept
Return the element count.
bool operator>=(const Queue &other) const
Order queues lexicographically.
typename Vector< T >::iterator iterator
Mutable iterator, front to back.
Definition queue.hxx:85
T value_type
Element type.
Definition queue.hxx:79
~Queue() noexcept
Destroy every element and release the block.
STORMBYTE_FORCE_INLINE Queue(std::queue< T > &&values)
Move elements from a caller-owned STL queue and leave it empty.
Definition queue.hxx:111
std::ptrdiff_t difference_type
Iterator distance type.
Definition queue.hxx:82
typename Vector< T >::const_iterator const_iterator
Read-only iterator, front to back.
Definition queue.hxx:86
STORMBYTE_FORCE_INLINE Queue & operator=(std::queue< T > &&values)
Move-assign a caller-owned STL queue and leave it empty.
Definition queue.hxx:194
Vector< T > container_type
Underlying Base-owned sequence.
Definition queue.hxx:80
Queue(const Queue &other)
Copy every element into a new Base block.
Queue(const container_type &values)
Copy the underlying sequence.
iterator end() noexcept
Return the mutable end iterator.
bool operator>(const Queue &other) const
Order queues lexicographically.
reference back()
Return the back element.
iterator begin() noexcept
Return a mutable iterator to the front.
reference emplace(Args &&... args)
Construct an element at the back.
const T & const_reference
Read-only element reference.
Definition queue.hxx:84
STORMBYTE_FORCE_INLINE std::strong_ordering operator<=>(const Queue &other) const
Order queues lexicographically.
Queue(Queue &&other) noexcept
Take the block.
reference front()
Return the front element.
void push(const T &value)
Append a copy.
bool operator<(const Queue &other) const
Order queues lexicographically.
void pop()
Remove the front element.
void swap(Queue &other) noexcept
Exchange blocks.
Queue(container_type &&values) noexcept
Take the underlying sequence.
bool empty() const noexcept
Test whether the queue is empty.
STORMBYTE_FORCE_INLINE void push_range(R &&range)
Append a copy of range, in order.
Definition queue.hxx:298
bool operator<=(const Queue &other) const
Order queues lexicographically.
Queue() noexcept
Construct an empty queue.
T & reference
Mutable element reference.
Definition queue.hxx:83
iterator erase(const_iterator first, const_iterator last)
Erase a half-open range.
STORMBYTE_FORCE_INLINE Queue(std::from_range_t, R &&range)
Copy the elements of range, in order.
Definition queue.hxx:139
const_iterator cbegin() const noexcept
Return a read-only iterator to the front.
Contiguous sequence stored on Base's heap.
Definition vector.hxx:81
const T * const_iterator
Read-only contiguous iterator.
Definition vector.hxx:91
T * iterator
Mutable contiguous iterator.
Definition vector.hxx:90
Count of abstract units (uint64_t storage).
Definition size.hxx:107
Type whose == and != both yield something convertible to bool.
Definition comparison.hxx:81
Recognizes a conditional Safe component after stripping cv and references.
Definition safe.hxx:301
FIFO wrappers supported by generic queue operations.
Definition wrappers.hxx:164
Owned values that cross a DLL without the caller's CRT.
void ThrowQueueOutOfBounds()
Throw the queue out-of-bounds error from Base.
void swap(Binary &left, Binary &right) noexcept
Exchange two sequences.
Definition binary.hxx:760
Root namespace of the StormByte suite.
Octet count. Defined in byte_size.hxx. Forwarded so Type::Numeral can name it.
Host-width-stable count (uint64_t), implicit only to std::size_t.
Recognizes types whose DLL-boundary safety depends on documented provider requirements.
Definition safe.hxx:262
Identifies Safe FIFO wrappers.
Definition safe.hxx:337
Recognizes collection values with Base-controlled lifetime.
Definition safe.hxx:347
Recognizes Base Safe components, not universal ABI compatibility.
Definition safe.hxx:138
#define STORMBYTE_PUBLIC_TYPE
Definition visibility.h:57
#define STORMBYTE_PUBLIC
Definition visibility.h:52