50#include <initializer_list>
79 template<Type::SafeValue T>
121 template<
std::input_iterator InputIt>
144 for (T& value : values)
205 Deque replacement(std::move(values));
225 template<std::input_iterator InputIt>
226 void assign(InputIt first, InputIt last);
233 void assign(std::initializer_list<T> values);
241 template<std::ranges::input_range R>
318 const_iterator
begin() const noexcept;
324 const_iterator
end() const noexcept;
336 const_iterator
cend() const noexcept;
403 return std::numeric_limits<size_type>::max() /
sizeof(T);
423 iterator
insert(const_iterator position, const T& value);
432 iterator
insert(const_iterator position, T&& value);
453 template<
std::input_iterator InputIt>
454 iterator
insert(const_iterator position, InputIt first, InputIt last);
463 iterator
insert(const_iterator position,
std::initializer_list<T> values);
473 template<
std::ranges::input_range R>
484 template<typename... Args>
485 iterator
emplace(const_iterator position, Args&&... args);
492 iterator
erase(const_iterator position);
500 iterator
erase(const_iterator first, const_iterator last);
523 template<typename... Args>
552 template<typename... Args>
566 template<
std::ranges::input_range R>
575 template<
std::ranges::input_range R>
605 for (
const T& value : *
this)
606 out.push_back(value);
618 reference Slot(size_type index)
noexcept;
625 const_reference Slot(size_type index)
const noexcept;
642 size_type m_capacity;
652 template<Type::SafeValue T>
662 template<Type::SafeValue T>
671 template<Type::SafeValue T>
Double-ended sequence stored on Base's heap.
Definition deque.hxx:80
reference back()
Return the last element.
std::reverse_iterator< const_iterator > const_reverse_iterator
Read-only reverse iterator.
Definition deque.hxx:92
const_reference back() const
Return the last element.
iterator erase(const_iterator position)
Destroy the element at position.
STORMBYTE_FORCE_INLINE const_reverse_iterator rbegin() const noexcept
Return a read-only reverse iterator to the last element.
Definition deque.hxx:358
std::reverse_iterator< iterator > reverse_iterator
Mutable reverse iterator.
Definition deque.hxx:91
void append_range(R &&range)
Append a range.
STORMBYTE_FORCE_INLINE const_reverse_iterator crend() const noexcept
Return the read-only reverse end iterator.
Definition deque.hxx:382
Deque() noexcept
Construct an empty deque.
void push_back(const T &value)
Append a copy.
void assign(InputIt first, InputIt last)
Replace the contents with the range [first, last).
iterator insert_range(const_iterator position, R &&range)
Insert a range before position.
reference emplace_back(Args &&... args)
Construct an element at the back.
T value_type
Element type.
Definition deque.hxx:82
iterator emplace(const_iterator position, Args &&... args)
Construct an element before position.
void pop_front()
Destroy the first element.
Deque(Deque &&other) noexcept
Take the blocks.
T & reference
Mutable element reference.
Definition deque.hxx:85
void assign_range(R &&range)
Replace the contents with a range.
bool empty() const noexcept
Test whether the deque is empty.
const_iterator cend() const noexcept
Return the read-only end iterator.
STORMBYTE_FORCE_INLINE reverse_iterator rend() noexcept
Return the mutable reverse end iterator.
Definition deque.hxx:350
void prepend_range(R &&range)
Prepend a range.
const_iterator cbegin() const noexcept
Return a read-only iterator to the first element.
STORMBYTE_FORCE_INLINE size_type max_size() const noexcept
Return the largest representable element count.
Definition deque.hxx:402
void resize(size_type count)
Change the element count.
reference at(size_type index)
Access an element.
iterator begin() noexcept
Return a mutable iterator to the first element.
void pop_back()
Destroy the last element.
T * pointer
Mutable element pointer.
Definition deque.hxx:87
~Deque() noexcept
Destroy every element and release the blocks.
void clear() noexcept
Destroy every element.
size_type size() const noexcept
Return the element count.
const_reference at(size_type index) const
Access an element.
reference emplace_front(Args &&... args)
Construct an element at the front.
void swap(Deque &other) noexcept
Exchange blocks.
void push_front(const T &value)
Prepend a copy.
const T & const_reference
Read-only element reference.
Definition deque.hxx:86
STORMBYTE_FORCE_INLINE const_reverse_iterator rend() const noexcept
Return the read-only reverse end iterator.
Definition deque.hxx:366
void shrink_to_fit()
Release unused blocks.
void assign(size_type count, const T &value)
Replace the contents with count copies of value.
std::ptrdiff_t difference_type
Iterator distance type.
Definition deque.hxx:84
const T * const_pointer
Read-only element pointer.
Definition deque.hxx:88
reference operator[](size_type index) noexcept
Access an element.
iterator end() noexcept
Return the mutable end iterator.
Size size_type
Element count. Size, not std::size_t.
Definition deque.hxx:83
void assign(std::initializer_list< T > values)
Replace the contents with an initializer list.
iterator insert(const_iterator position, const T &value)
Insert a copy before position.
const_reference front() const
Return the first element.
Deque(const Deque &other)
Copy every element into new Base blocks.
const_reference operator[](size_type index) const noexcept
Access an element.
STORMBYTE_FORCE_INLINE const_reverse_iterator crbegin() const noexcept
Return a read-only reverse iterator to the last element.
Definition deque.hxx:374
reference front()
Return the first element.
STORMBYTE_FORCE_INLINE reverse_iterator rbegin() noexcept
Return a mutable reverse iterator to the last element.
Definition deque.hxx:342
Count of abstract units (uint64_t storage).
Definition size.hxx:107
Private Base heap used by StormByte::Safe::Shared, StormByte::Safe::Unique and StormByte::Safe::Clona...
Owned values that cross a DLL without the caller's CRT.
bool operator==(std::span< const std::byte > bytes, const Binary &data) noexcept
Equality of a span against a sequence.
Definition binary.hxx:770
void ThrowDequeOutOfBounds()
Throw the deque out-of-bounds error from Base.
void swap(Binary &left, Binary &right) noexcept
Exchange two sequences.
Definition binary.hxx:760
STORMBYTE_FORCE_INLINE std::strong_ordering operator<=>(std::span< const std::byte > bytes, const Binary &data) noexcept
Three-way comparison of a span against a sequence.
Definition binary.hxx:790
Root namespace of the StormByte suite.
Host-width-stable count (uint64_t), implicit only to std::size_t.
#define STORMBYTE_PUBLIC_TYPE
Definition visibility.h:57
#define STORMBYTE_PUBLIC
Definition visibility.h:52