#include <circular_buffer.h>
template<typename T, int DefaultCapacity = 100, typename Alloc = std::allocator<T>>
circular_buffer class
STL-like circular buffer.
Contents
Public types
-
using self_type = circular_
buffer<T, DefaultCapacity, Alloc> - using allocator_type = Alloc
- using value_type = Alloc::value_type
- using pointer = Alloc::pointer
- using const_pointer = Alloc::const_pointer
- using reference = Alloc::reference
- using const_reference = Alloc::const_reference
- using size_type = Alloc::size_type
- using difference_type = Alloc::difference_type
-
using iterator = circular_
buffer_ iterator<self_ type, self_ type> -
using const_iterator = circular_
buffer_ iterator<const self_ type, self_ type, const value_ type>
Constructors, destructors, conversion operators
-
circular_buffer(size_
type capacity = DefaultCapacity) explicit -
circular_buffer(const circular_
buffer& other) -
template<class InputIterator>circular_buffer(InputIterator from, InputIterator to)
- ~circular_buffer()
Public functions
-
auto operator=(const self_
type& other) -> circular_ buffer& -
void swap(circular_
buffer& other) -
auto get_allocator() const -> allocator_
type - auto begin() -> iterator
- auto end() -> iterator
-
auto begin() const -> const_
iterator -
auto cbegin() const -> const_
iterator -
auto end() const -> const_
iterator -
auto cend() const -> const_
iterator -
auto size() const -> size_
type -
auto capacity() const -> size_
type - auto empty() const -> bool
-
auto max_size() const -> size_
type -
void reserve(size_
type new_size) - auto front() -> reference
- auto back() -> reference
-
auto front() const -> const_
reference -
auto back() const -> const_
reference -
void push_back(const value_
type& item) - void pop_front()
- void pop_back()
- void clear()
-
auto operator[](size_
type n) -> reference -
auto operator[](size_
type n) const -> const_ reference -
auto at(size_
type n) -> reference -
auto at(size_
type n) const -> const_ reference