iffl
1.3.4
Implements Intrusive Flat Forward List container
|
A set of pointers describing state of the buffer containing flat forward list. More...
#include <iffl_common.h>
Public Types | |
using | value_type = T |
type of buffer elements | |
using | pointer_type = T * |
Pinter to the buffer elements. | |
using | refernce_type = T & |
Reference to the buffer elements. | |
using | size_type = size_t |
Size type. | |
Public Member Functions | |
buffer_t ()=default | |
Default constructor. | |
buffer_t (buffer_t const &)=default | |
Copy constructor. | |
buffer_t & | operator= (buffer_t const &)=default |
Copy assignment operator. | |
template<typename V , typename = std::enable_if<std::is_assignable_v<T*, V*>>> | |
buffer_t (buffer_t< V > const &buff) | |
Constructors const buffer from non-const buffer. More... | |
template<typename V , typename = std::enable_if<std::is_assignable_v<T*, V*>>> | |
buffer_t & | operator= (buffer_t< V > const &buff) |
Assignment operator to const buffer from non-const buffer. More... | |
buffer_t (T *begin, T *last, T *end) noexcept | |
Assignment operator to const buffer from pointers. | |
buffer_t (T *begin, size_t *last_offset, T *end_offset) noexcept | |
Assignment operator to const buffer from pointers. | |
constexpr void | set_begin (pointer_type new_begin) noexcept |
Sets pointer to the buffer begin and recalculates last and end. More... | |
constexpr size_type | size () const noexcept |
constexpr void | set_size_unsafe (size_type size) noexcept |
Updates buffer size. More... | |
constexpr void | set_size (size_type size) noexcept |
Updates buffer size. More... | |
constexpr size_type | last_offset () const noexcept |
constexpr void | set_last_offset_unsafe (size_type offset) noexcept |
Sets offset of the last pointer. More... | |
constexpr void | set_last_offset (size_type offset) noexcept |
Sets offset of the last pointer. More... | |
constexpr void | validate () const noexcept |
Fail fast is invariants are broken. | |
constexpr void | clear () noexcept |
Resets all pointers to nullptr. | |
constexpr void | forget_last () noexcept |
Sets pointer to last element to nullptr. | |
constexpr | operator bool () const noexcept |
Public Attributes | |
pointer_type | begin { nullptr } |
Pointer to the beginning of buffer nullptr if no buffer. | |
pointer_type | last { nullptr } |
Pointer to the last element in the list nullptr if no buffer or if there is no elements in the list. | |
pointer_type | end { nullptr } |
Pointer to the end of buffer nullptr if no buffer. | |
Static Public Attributes | |
static bool const | is_const { std::is_same_v<T, char const> } |
True if this is const buffer and false otherwise. | |
A set of pointers describing state of the buffer containing flat forward list.
|
inline |
Constructors const buffer from non-const buffer.
Use SFINAE to enable it only on const instantiation to support assignment from a non-const instantiation of template
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inline |
Assignment operator to const buffer from non-const buffer.
Use SFINAE to enable it only on const instantiation to support assignment from a non-const instantiation of template
|
inlinenoexcept |
Sets pointer to the buffer begin and recalculates last and end.
new_begin | - pointer to the buffer begin |
|
inlinenoexcept |
Sets offset of the last pointer.
offset | - offset of the last element in the buffer |
|
inlinenoexcept |
Sets offset of the last pointer.
offset | - offset of the last element in the buffer |
|
inlinenoexcept |
Updates buffer size.
size | - size of the buffer |
|
inlinenoexcept |
Updates buffer size.
size | - size of the buffer |
|
inlinenoexcept |