sparrow 0.3.0
|
Object that owns a piece of contiguous memory. More...
#include <buffer.hpp>
Public Types | |
using | allocator_type = typename base_type::allocator_type |
using | value_type = T |
using | reference = value_type& |
using | const_reference = const value_type& |
using | pointer = typename alloc_traits::pointer |
using | const_pointer = typename alloc_traits::const_pointer |
using | size_type = typename alloc_traits::size_type |
using | difference_type = typename alloc_traits::difference_type |
using | iterator = pointer_iterator<pointer> |
using | const_iterator = pointer_iterator<const_pointer> |
using | reverse_iterator = std::reverse_iterator<iterator> |
using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
Public Member Functions | |
buffer ()=default | |
template<class A> requires (not std::same_as<A, buffer<T>> and allocator<A>) | |
constexpr | buffer (const A &a) |
template<allocator A = allocator_type> | |
constexpr | buffer (size_type n, const A &a=A()) |
template<allocator A = allocator_type> | |
constexpr | buffer (size_type n, const value_type &v, const A &a=A()) |
template<allocator A = allocator_type> | |
constexpr | buffer (pointer p, size_type n, const A &a=A()) |
template<allocator A = allocator_type> | |
constexpr | buffer (std::initializer_list< value_type > init, const A &a=A()) |
template<class It, allocator A = allocator_type> | |
constexpr | buffer (It first, It last, const A &a=A()) |
template<std::ranges::input_range Range, allocator A = allocator_type> requires std::same_as<std::ranges::range_value_t<Range>, T> | |
constexpr | buffer (const Range &range, const A &a=A()) |
~buffer () | |
buffer (const buffer &rhs) | |
template<allocator A> | |
buffer (const buffer &rhs, const A &a) | |
buffer (buffer &&rhs) noexcept=default | |
template<allocator A> | |
buffer (buffer &&rhs, const A &a) | |
constexpr buffer & | operator= (const buffer &rhs) |
constexpr buffer & | operator= (buffer &&rhs) |
constexpr buffer & | operator= (std::initializer_list< value_type > init) |
constexpr reference | operator[] (size_type i) |
constexpr const_reference | operator[] (size_type i) const |
constexpr reference | front () |
constexpr const_reference | front () const |
constexpr reference | back () |
constexpr const_reference | back () const |
template<class U = T> | |
constexpr U * | data () noexcept |
template<class U = T> | |
constexpr const U * | data () const noexcept |
constexpr iterator | begin () noexcept |
constexpr iterator | end () noexcept |
constexpr const_iterator | begin () const noexcept |
constexpr const_iterator | end () const noexcept |
constexpr const_iterator | cbegin () const noexcept |
constexpr const_iterator | cend () const noexcept |
constexpr reverse_iterator | rbegin () noexcept |
constexpr reverse_iterator | rend () noexcept |
constexpr const_reverse_iterator | rbegin () const noexcept |
constexpr const_reverse_iterator | rend () const noexcept |
constexpr const_reverse_iterator | crbegin () const noexcept |
constexpr const_reverse_iterator | crend () const noexcept |
constexpr bool | empty () const noexcept |
constexpr size_type | capacity () const noexcept |
constexpr size_type | size () const noexcept |
constexpr size_type | max_size () const noexcept |
constexpr void | reserve (size_type new_cap) |
constexpr void | shrink_to_fit () |
constexpr void | clear () |
constexpr iterator | insert (const_iterator pos, const T &value) |
constexpr iterator | insert (const_iterator pos, T &&value) |
constexpr iterator | insert (const_iterator pos, size_type count, const T &value) |
template<mpl::iterator_of_type< T > InputIt> | |
constexpr iterator | insert (const_iterator pos, InputIt first, InputIt last) |
template<std::ranges::input_range R> requires std::same_as<std::ranges::range_value_t<R>, T> | |
constexpr iterator | insert (const_iterator pos, R &&range) |
constexpr iterator | insert (const_iterator pos, std::initializer_list< T > ilist) |
template<class... Args> | |
constexpr iterator | emplace (const_iterator pos, Args &&... args) |
constexpr iterator | erase (const_iterator pos) |
constexpr iterator | erase (const_iterator first, const_iterator last) |
constexpr void | push_back (const T &value) |
constexpr void | push_back (T &&value) |
constexpr void | pop_back () |
constexpr void | resize (size_type new_size) |
constexpr void | resize (size_type new_size, const value_type &value) |
constexpr void | swap (buffer &rhs) noexcept |
template<mpl::iterator_of_type< T > InputIt> | |
constexpr auto | insert (const_iterator pos, InputIt first, InputIt last) -> iterator |
template<std::ranges::input_range R> requires std::same_as<std::ranges::range_value_t<R>, T> | |
constexpr auto | insert (const_iterator pos, R &&range) -> iterator |
template<class It> | |
constexpr auto | allocate_and_copy (size_type n, It first, It last) -> pointer |
template<class It> | |
constexpr auto | copy_initialize (It first, It last, pointer begin, allocator_type &a) -> pointer |
Object that owns a piece of contiguous memory.
This class provides an API similar to std::vector, with two main differences:
Definition at line 108 of file buffer.hpp.
using sparrow::buffer< T >::allocator_type = typename base_type::allocator_type |
Definition at line 120 of file buffer.hpp.
using sparrow::buffer< T >::const_iterator = pointer_iterator<const_pointer> |
Definition at line 129 of file buffer.hpp.
using sparrow::buffer< T >::const_pointer = typename alloc_traits::const_pointer |
Definition at line 125 of file buffer.hpp.
using sparrow::buffer< T >::const_reference = const value_type& |
Definition at line 123 of file buffer.hpp.
using sparrow::buffer< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 131 of file buffer.hpp.
using sparrow::buffer< T >::difference_type = typename alloc_traits::difference_type |
Definition at line 127 of file buffer.hpp.
using sparrow::buffer< T >::iterator = pointer_iterator<pointer> |
Definition at line 128 of file buffer.hpp.
using sparrow::buffer< T >::pointer = typename alloc_traits::pointer |
Definition at line 124 of file buffer.hpp.
using sparrow::buffer< T >::reference = value_type& |
Definition at line 122 of file buffer.hpp.
using sparrow::buffer< T >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 130 of file buffer.hpp.
using sparrow::buffer< T >::size_type = typename alloc_traits::size_type |
Definition at line 126 of file buffer.hpp.
using sparrow::buffer< T >::value_type = T |
Definition at line 121 of file buffer.hpp.
|
default |
|
inlineexplicitconstexpr |
Definition at line 137 of file buffer.hpp.
|
explicitconstexpr |
Definition at line 420 of file buffer.hpp.
|
constexpr |
Definition at line 428 of file buffer.hpp.
|
constexpr |
Definition at line 436 of file buffer.hpp.
|
constexpr |
|
constexpr |
Definition at line 451 of file buffer.hpp.
|
constexpr |
sparrow::buffer< T >::~buffer | ( | ) |
Definition at line 472 of file buffer.hpp.
sparrow::buffer< T >::buffer | ( | const buffer< T > & | rhs | ) |
sparrow::buffer< T >::buffer | ( | const buffer< T > & | rhs, |
const A & | a ) |
|
defaultnoexcept |
sparrow::buffer< T >::buffer | ( | buffer< T > && | rhs, |
const A & | a ) |
|
constexpr |
|
nodiscardconstexpr |
Definition at line 579 of file buffer.hpp.
|
nodiscardconstexpr |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 621 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 645 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 651 of file buffer.hpp.
|
constexpr |
|
constexpr |
|
nodiscardconstexprnoexcept |
Definition at line 681 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 687 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 608 of file buffer.hpp.
|
constexpr |
Definition at line 856 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 627 of file buffer.hpp.
|
constexpr |
|
constexpr |
Definition at line 878 of file buffer.hpp.
|
nodiscardconstexpr |
Definition at line 565 of file buffer.hpp.
|
nodiscardconstexpr |
|
constexpr |
Definition at line 765 of file buffer.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
nodiscardconstexprnoexcept |
|
constexpr |
|
constexpr |
|
constexpr |
|
nodiscardconstexpr |
Definition at line 551 of file buffer.hpp.
|
nodiscardconstexpr |
|
constexpr |
Definition at line 911 of file buffer.hpp.
|
constexpr |
Definition at line 899 of file buffer.hpp.
|
constexpr |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 657 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 663 of file buffer.hpp.
|
constexpr |
Definition at line 717 of file buffer.hpp.
|
constexpr |
|
constexpr |
Definition at line 931 of file buffer.hpp.
|
constexpr |
Definition at line 750 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
|
constexprnoexcept |
Definition at line 943 of file buffer.hpp.