|
constexpr | u8_buffer (u8_buffer &&other) noexcept |
| Move constructor.
|
|
constexpr | u8_buffer (const u8_buffer &other) |
| Copy constructor.
|
|
u8_buffer & | operator= (u8_buffer &&other)=delete |
| Move assignment operator (deleted).
|
|
u8_buffer & | operator= (u8_buffer &other)=delete |
| Copy assignment operator (deleted).
|
|
| ~u8_buffer ()=default |
| Destructor.
|
|
constexpr | u8_buffer (std::size_t n, const T &val=T{}) |
| Constructs a buffer with n elements, each initialized to val .
|
|
template<std::ranges::input_range R>
requires ( !std::same_as<u8_buffer<T>, std::decay_t<R>> && std::convertible_to<std::ranges::range_value_t<R>, T> ) |
constexpr | u8_buffer (R &&range) |
| Constructs a buffer with the elements of the range range .
|
|
constexpr | u8_buffer (std::initializer_list< T > ilist) |
| Constructs a buffer with the elements of the initializer list ilist .
|
|
template<allocator A = std::allocator<std::uint8_t>> |
constexpr | u8_buffer (T *data_ptr, std::size_t count, const A &a=A()) |
| Constructs a buffer by taking ownership of the storage pointed to by data_ptr .
|
|
constexpr buffer< std::uint8_t > | extract_storage () &&noexcept |
| Extracts the storage by moving the wrapped value.
|
|
constexpr | buffer_adaptor (FromBufferRef buf) |
| Constructs a buffer adaptor with a non-const buffer reference.
|
|
constexpr | buffer_adaptor (const FromBufferRef buf) |
| Constructs a buffer adaptor with a const buffer reference.
|
|
constexpr pointer | data () noexcept |
| Returns a pointer to the underlying data.
|
|
constexpr const_pointer | data () const noexcept |
| Returns a constant pointer to the underlying data.
|
|
constexpr reference | operator[] (size_type idx) |
| Returns a reference to the element at the specified index.
|
|
constexpr const_reference | operator[] (size_type idx) const |
| Returns a constant reference to the element at the specified index.
|
|
constexpr reference | front () |
| Returns a reference to the first element.
|
|
constexpr const_reference | front () const |
| Returns a constant reference to the first element.
|
|
constexpr reference | back () |
| Returns a reference to the last element.
|
|
constexpr const_reference | back () const |
| Returns a constant reference to the last element.
|
|
constexpr iterator | begin () noexcept |
| Returns an iterator to the beginning.
|
|
constexpr iterator | end () noexcept |
| Returns an iterator to the end.
|
|
constexpr const_iterator | begin () const noexcept |
| Returns a constant iterator to the beginning.
|
|
constexpr const_iterator | end () const noexcept |
| Returns a constant iterator to the end.
|
|
constexpr const_iterator | cbegin () const noexcept |
| Returns a constant iterator to the beginning.
|
|
constexpr const_iterator | cend () const noexcept |
| Returns a constant iterator to the end.
|
|
constexpr reverse_iterator | rbegin () noexcept |
| Returns a reverse iterator to the beginning.
|
|
constexpr reverse_iterator | rend () noexcept |
| Returns a reverse iterator to the end.
|
|
constexpr const_reverse_iterator | rbegin () const noexcept |
| Returns a constant reverse iterator to the beginning.
|
|
constexpr const_reverse_iterator | rend () const noexcept |
| Returns a constant reverse iterator to the end.
|
|
constexpr const_reverse_iterator | crbegin () const noexcept |
| Returns a constant reverse iterator to the beginning.
|
|
constexpr const_reverse_iterator | crend () const noexcept |
| Returns a constant reverse iterator to the end.
|
|
constexpr size_type | size () const noexcept(!SPARROW_CONTRACTS_THROW_ON_FAILURE) |
| Returns the number of elements that can be held in currently allocated storage.
|
|
constexpr size_type | max_size () const noexcept |
| Returns the maximum possible number of elements.
|
|
constexpr size_type | capacity () const noexcept |
| Returns the number of elements that can be held in currently allocated storage.
|
|
constexpr bool | empty () const noexcept |
| Checks whether the container is empty.
|
|
constexpr void | reserve (size_type new_cap) |
| Reserves storage for at least the specified number of elements.
|
|
constexpr void | shrink_to_fit () |
| Requests the removal of unused capacity.
|
|
constexpr void | clear () noexcept |
| Clears the contents.
|
|
constexpr iterator | insert (const_iterator pos, const value_type &value) |
| Inserts an element at the specified position.
|
|
constexpr iterator | insert (const_iterator pos, size_type count, const value_type &value) |
| Inserts multiple copies of an element at the specified position.
|
|
constexpr iterator | insert (const_iterator pos, InputIt first, InputIt last) |
| Inserts elements from a range at the specified position.
|
|
constexpr iterator | insert (const_iterator pos, std::initializer_list< value_type > ilist) |
| Inserts elements from an initializer list at the specified position.
|
|
constexpr iterator | emplace (const_iterator pos, Args &&... args) |
| Constructs an element in-place at the specified position.
|
|
constexpr iterator | erase (const_iterator pos) |
| Erases an element at the specified position.
|
|
constexpr iterator | erase (const_iterator first, const_iterator last) |
| Erases elements in the specified range.
|
|
constexpr void | push_back (const value_type &value) |
| Adds an element to the end.
|
|
constexpr void | pop_back () |
| Removes the last element.
|
|
constexpr void | resize (size_type new_size) |
| Changes the number of elements stored.
|
|
constexpr void | resize (size_type new_size, const value_type &value) |
| Changes the number of elements stored, filling new elements with the specified value.
|
|
constexpr | buffer_adaptor (FromBufferRef buf) |
| Constructs a buffer adaptor with a non-const buffer reference.
|
|
constexpr | buffer_adaptor (const FromBufferRef buf) |
| Constructs a buffer adaptor with a const buffer reference.
|
|
constexpr pointer | data () noexcept |
| Returns a pointer to the underlying data.
|
|
constexpr const_pointer | data () const noexcept |
| Returns a constant pointer to the underlying data.
|
|
constexpr reference | operator[] (size_type idx) |
| Returns a reference to the element at the specified index.
|
|
constexpr const_reference | operator[] (size_type idx) const |
| Returns a constant reference to the element at the specified index.
|
|
constexpr reference | front () |
| Returns a reference to the first element.
|
|
constexpr const_reference | front () const |
| Returns a constant reference to the first element.
|
|
constexpr reference | back () |
| Returns a reference to the last element.
|
|
constexpr const_reference | back () const |
| Returns a constant reference to the last element.
|
|
constexpr iterator | begin () noexcept |
| Returns an iterator to the beginning.
|
|
constexpr const_iterator | begin () const noexcept |
| Returns a constant iterator to the beginning.
|
|
constexpr iterator | end () noexcept |
| Returns an iterator to the end.
|
|
constexpr const_iterator | end () const noexcept |
| Returns a constant iterator to the end.
|
|
constexpr const_iterator | cbegin () const noexcept |
| Returns a constant iterator to the beginning.
|
|
constexpr const_iterator | cend () const noexcept |
| Returns a constant iterator to the end.
|
|
constexpr reverse_iterator | rbegin () noexcept |
| Returns a reverse iterator to the beginning.
|
|
constexpr const_reverse_iterator | rbegin () const noexcept |
| Returns a constant reverse iterator to the beginning.
|
|
constexpr reverse_iterator | rend () noexcept |
| Returns a reverse iterator to the end.
|
|
constexpr const_reverse_iterator | rend () const noexcept |
| Returns a constant reverse iterator to the end.
|
|
constexpr const_reverse_iterator | crbegin () const noexcept |
| Returns a constant reverse iterator to the beginning.
|
|
constexpr const_reverse_iterator | crend () const noexcept |
| Returns a constant reverse iterator to the end.
|
|
constexpr size_type | size () const noexcept(!SPARROW_CONTRACTS_THROW_ON_FAILURE) |
| Returns the number of elements that can be held in currently allocated storage.
|
|
constexpr size_type | max_size () const noexcept |
| Returns the maximum possible number of elements.
|
|
constexpr size_type | capacity () const noexcept |
| Returns the number of elements that can be held in currently allocated storage.
|
|
constexpr bool | empty () const noexcept |
| Checks whether the container is empty.
|
|
constexpr void | reserve (size_type new_cap) |
| Reserves storage for at least the specified number of elements.
|
|
constexpr void | shrink_to_fit () |
| Requests the removal of unused capacity.
|
|
constexpr void | clear () noexcept |
| Clears the contents.
|
|
constexpr iterator | insert (const_iterator pos, const value_type &value) |
| Inserts an element at the specified position.
|
|
constexpr iterator | insert (const_iterator pos, size_type count, const value_type &value) |
| Inserts multiple copies of an element at the specified position.
|
|
constexpr iterator | insert (const_iterator pos, InputIt first, InputIt last) |
| Inserts elements from a range at the specified position.
|
|
constexpr iterator | insert (const_iterator pos, std::initializer_list< value_type > ilist) |
| Inserts elements from an initializer list at the specified position.
|
|
constexpr iterator | emplace (const_iterator pos, Args &&... args) |
| Constructs an element in-place at the specified position.
|
|
constexpr iterator | erase (const_iterator pos) |
| Erases an element at the specified position.
|
|
constexpr iterator | erase (const_iterator first, const_iterator last) |
| Erases elements in the specified range.
|
|
constexpr void | push_back (const value_type &value) |
| Adds an element to the end.
|
|
constexpr void | pop_back () |
| Removes the last element.
|
|
constexpr void | resize (size_type new_size) |
| Changes the number of elements stored.
|
|
constexpr void | resize (size_type new_size, const value_type &value) |
| Changes the number of elements stored, filling new elements with the specified value.
|
|
template<class T>
class sparrow::u8_buffer< T >
This buffer class is used as storage buffer for all sparrow arrays.
Its internal storage can be extracted.
- Template Parameters
-
T | The element type stored in the buffer. |
Definition at line 105 of file u8_buffer.hpp.