12#if HX_USE_MACROS_WITH_MODULE
13#error Header does not provide macros alone.
26template<
typename T_, hx
size_t capacity_=hxallocator_dynamic_capacity>
68 template<
typename... args_t_>
74 template<
typename... args_t_>
101 template<
typename... args_t_>
107 template<
typename... args_t_>
123 void operator=(
const hxdeque&) =
delete;
129#include "detail/hxdeque.inl"
const T * data(void) const
Returns a pointer to a const and potentially uninitialized array of T.
Definition hxallocator.hpp:96
hxallocator(void)
Does not allocate until reserve_storage is called.
Definition hxallocator.hpp:78
T & at(hxsize_t index_)
Returns a reference to the element at logical index index.
T & front(void)
Returns a reference to the front element.
void pop_back(void) noexcept
Removes and destroys the back element.
void emplace_front(args_t_ &&... args_) noexcept
Constructs an element in place at the front using forwarded arguments.
hxsize_t size(void) const
Returns the number of elements currently in the deque.
void emplace_back(args_t_ &&... args_) noexcept
Constructs an element in place at the back using forwarded arguments.
hxsize_t max_size(void) const
Returns the capacity of the deque.
Definition hxdeque.hpp:90
void clear(void) noexcept
Destroys all elements and resets the deque to empty without deallocating.
bool empty(void) const
Returns true if the deque contains no elements.
bool full(void) const
Returns true if the deque is at capacity.
const T & operator[](hxsize_t index_) const
Returns a const reference to the element at logical index index.
const T & back(void) const
Returns a const reference to the back element.
hxdeque(hxsize_t dynamic_capacity_=0)
Constructs an empty hxdeque.
void push_front(args_t_ &&... args_) noexcept
Prepends an element at the front using forwarded arguments.
T & operator[](hxsize_t index_)
Returns a reference to the element at logical index index.
T & back(void)
Returns a reference to the back element.
~hxdeque(void)
Destroys all elements in the deque.
void pop_front(void) noexcept
Removes and destroys the front element.
const T & front(void) const
Returns a const reference to the front element.
const T & at(hxsize_t index_) const
Returns a const reference to the element at logical index index.
void push_back(args_t_ &&... args_) noexcept
Appends an element at the back using forwarded arguments.
hxsize_t capacity(void) const
Returns the capacity of the deque or 0 if unallocated.
void reserve(hxsize_t dynamic_capacity_)
Allocates storage for a dynamic deque.
Similar to std::allocator.
#define hxattr_nodiscard
hxattr_nodiscard - Indicates the caller should not discard the return value.
Definition hxsettings.h:89
A few utility functions and most standard C++ meta programming functions.
Provides core macros, memory management and feature detection.
ptrdiff_t hxsize_t
hxsize_t - A signed size type, same as ssize_t or ptrdiff_t.
Definition libhatchet.h:209