|
emlabcpp
modern opinionated embedded C++ library
|
Strategy for managing indices in circular buffer via overflowing indices. More...
#include <static_circular_buffer.h>
Public Types | |
| using | index_type = decltype(_select_index_type< N >()) |
| using | size_type = typename index_type::value_type |
Public Member Functions | |
| void | incr_front () noexcept |
| void | incr_front (size_type n) noexcept |
| auto | front_idx () const noexcept |
| void | incr_back () noexcept |
| void | incr_back (size_type n) noexcept |
| auto | back_idx () const noexcept |
| auto | size () const noexcept |
| bool | empty () const noexcept |
| bool | full () const noexcept |
| index_type | last_idx () const noexcept |
Static Public Attributes | |
| static constexpr std::size_t | max_size = N |
Strategy for managing indices in circular buffer via overflowing indices.
This strategy allows to use all N slots of the buffer by allowing the indices to overflow. This works correctly as long as buffer size is power of two.
| using emlabcpp::_overflow_strategy< N >::index_type = decltype( _select_index_type< N >() ) |
| using emlabcpp::_overflow_strategy< N >::size_type = typename index_type::value_type |
|
inlinenoexcept |
References emlabcpp::_overflow_strategy< N >::max_size.
|
inlinenoexcept |
|
inlinenoexcept |
References emlabcpp::_overflow_strategy< N >::max_size.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
References emlabcpp::_overflow_strategy< N >::max_size.
|
inlinenoexcept |
|
staticconstexpr |