Seastar
High performance C++ framework for concurrent servers
|
A fixed-capacity container (like boost::static_vector) that can insert and remove at both ends (like std::deque). Does not allocate.
Does not perform overflow checking when size exceeds capacity.
T | type of objects stored in the container; must be noexcept move enabled |
Capacity | maximum number of objects that can be stored in the container; must be a power of 2 |
#include <seastar/core/circular_buffer_fixed_capacity.hh>
Classes | |
class | cbiterator |
Public Types | |
using | value_type = T |
using | size_type = size_t |
using | reference = T & |
using | pointer = T * |
using | const_reference = const T & |
using | const_pointer = const T * |
using | difference_type = ssize_t |
using | iterator = cbiterator< T > |
using | const_iterator = cbiterator< const T > |
Public Member Functions | |
circular_buffer_fixed_capacity (circular_buffer_fixed_capacity &&x) noexcept | |
circular_buffer_fixed_capacity & | operator= (circular_buffer_fixed_capacity &&x) noexcept |
void | push_front (const T &data) |
void | push_front (T &&data) |
template<typename... A> | |
T & | emplace_front (A &&... args) |
void | push_back (const T &data) |
void | push_back (T &&data) |
template<typename... A> | |
T & | emplace_back (A &&... args) |
T & | front () |
T & | back () |
void | pop_front () |
void | pop_back () |
bool | empty () const |
size_t | size () const |
size_t | capacity () const |
T & | operator[] (size_t idx) |
void | clear () |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
iterator | erase (iterator first, iterator last) |
template<typename... Args> | |
T & | emplace_front (Args &&... args) |
template<typename... Args> | |
T & | emplace_back (Args &&... args) |