|
sparrow 1.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 | default_allocator = std::allocator<T> |
| 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 = default_allocator> | |
| constexpr | buffer (size_type n, const A &a=A()) |
| template<allocator A = default_allocator> | |
| constexpr | buffer (size_type n, const value_type &v, const A &a=A()) |
| template<allocator A = default_allocator> | |
| constexpr | buffer (pointer p, size_type n, const A &a=A()) |
| template<allocator A = default_allocator> | |
| constexpr | buffer (std::initializer_list< value_type > init, const A &a=A()) |
| template<class It, allocator A = default_allocator> | |
| constexpr | buffer (It first, It last, const A &a=A()) |
| template<std::ranges::input_range Range, allocator A = default_allocator> requires (std::same_as<std::ranges::range_value_t<Range>, T> && !is_buffer_view<Range>) | |
| constexpr | buffer (const Range &range, const A &a=A()) |
| ~buffer () | |
| constexpr | buffer (const buffer &rhs) |
| template<allocator A> | |
| constexpr | buffer (const buffer &rhs, const A &a) |
| constexpr | buffer (buffer &&rhs) noexcept=default |
| template<allocator A> | |
| constexpr | 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 112 of file buffer.hpp.
| using sparrow::buffer< T >::allocator_type = typename base_type::allocator_type |
Definition at line 124 of file buffer.hpp.
| using sparrow::buffer< T >::const_iterator = pointer_iterator<const_pointer> |
Definition at line 134 of file buffer.hpp.
| using sparrow::buffer< T >::const_pointer = typename alloc_traits::const_pointer |
Definition at line 130 of file buffer.hpp.
| using sparrow::buffer< T >::const_reference = const value_type& |
Definition at line 128 of file buffer.hpp.
| using sparrow::buffer< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 136 of file buffer.hpp.
| using sparrow::buffer< T >::default_allocator = std::allocator<T> |
Definition at line 125 of file buffer.hpp.
| using sparrow::buffer< T >::difference_type = typename alloc_traits::difference_type |
Definition at line 132 of file buffer.hpp.
| using sparrow::buffer< T >::iterator = pointer_iterator<pointer> |
Definition at line 133 of file buffer.hpp.
| using sparrow::buffer< T >::pointer = typename alloc_traits::pointer |
Definition at line 129 of file buffer.hpp.
| using sparrow::buffer< T >::reference = value_type& |
Definition at line 127 of file buffer.hpp.
| using sparrow::buffer< T >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 135 of file buffer.hpp.
| using sparrow::buffer< T >::size_type = typename alloc_traits::size_type |
Definition at line 131 of file buffer.hpp.
| using sparrow::buffer< T >::value_type = T |
Definition at line 126 of file buffer.hpp.
|
default |
|
inlineexplicitconstexpr |
Definition at line 142 of file buffer.hpp.
|
explicitconstexpr |
Definition at line 425 of file buffer.hpp.
|
constexpr |
Definition at line 433 of file buffer.hpp.
|
constexpr |
Definition at line 441 of file buffer.hpp.
|
constexpr |
|
constexpr |
Definition at line 456 of file buffer.hpp.
|
constexpr |
| sparrow::buffer< T >::~buffer | ( | ) |
Definition at line 477 of file buffer.hpp.
|
constexpr |
|
constexpr |
|
constexprdefaultnoexcept |
|
constexpr |
|
constexpr |
Definition at line 1055 of file buffer.hpp.
|
nodiscardconstexpr |
|
nodiscardconstexpr |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 657 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 681 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 687 of file buffer.hpp.
|
constexpr |
|
constexpr |
Definition at line 1113 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 717 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 723 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 644 of file buffer.hpp.
|
constexpr |
Definition at line 903 of file buffer.hpp.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 663 of file buffer.hpp.
|
constexpr |
|
constexpr |
Definition at line 925 of file buffer.hpp.
|
nodiscardconstexpr |
|
nodiscardconstexpr |
|
constexpr |
Definition at line 812 of file buffer.hpp.
|
constexpr |
|
constexpr |
Definition at line 860 of file buffer.hpp.
|
constexpr |
|
constexpr |
Definition at line 886 of file buffer.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
|
nodiscardconstexprnoexcept |
|
constexpr |
|
constexpr |
|
constexpr |
|
nodiscardconstexpr |
|
nodiscardconstexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
constexpr |
|
constexpr |
Definition at line 966 of file buffer.hpp.
|
constexpr |
Definition at line 978 of file buffer.hpp.
|
constexpr |
|
nodiscardconstexprnoexcept |
|
constexprnoexcept |