Template Class RingDeque
Defined in File RingDeque.h
Class Documentation
-
template<class T>
class RingDeque a double ended queue on a circular vector of 2^k places that doubles
Public Types
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using const_reverse_iterator = std::reverse_iterator<const_iterator>
Public Functions
-
RingDeque(void) = default
-
~RingDeque()
-
inline bool empty(void) const
-
inline std::size_t size(void) const
-
inline std::size_t capacity(void) const
the places, 0 or a power of 2
-
void reserve(std::size_t n)
at least n places
-
template<class ...Args>
T &emplace_back(Args&&... args) the item built from args at the back
- Post:
one item more, the new one at the back
-
template<class ...Args>
T &emplace_front(Args&&... args) the item built from args at the front
- Post:
one item more, the new one at the front
-
void pop_front(void)
- Pre:
the deque is not empty
- Post:
one item less
-
void pop_back(void)
- Pre:
the deque is not empty
- Post:
one item less
-
void clear(void)
removes all the items, the places kept
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
inline reverse_iterator rbegin(void)
-
inline reverse_iterator rend(void)
-
inline const_reverse_iterator rbegin(void) const
-
inline const_reverse_iterator rend(void) const
-
using size_type = std::size_t