|
|
constexpr | basic_dynamic_array () noexcept=default |
| | Default constructor.
|
| |
| constexpr | basic_dynamic_array (const allocator_type &allocator) |
| | Default construct the container with a given allocator. More...
|
| |
| constexpr | basic_dynamic_array (size_type count, const_reference value, const allocator_type &allocator=allocator_type{}) |
| | Construct the container with count copies of elements with value value. More...
|
| |
| constexpr | basic_dynamic_array (std::initializer_list< Any > init, const allocator_type &allocator=allocator_type{}) |
| | Construct the container with the contents of the initializer list init. More...
|
| |
| template<std::input_iterator InputIt> |
| constexpr | basic_dynamic_array (InputIt first, InputIt last, const allocator_type &allocator=allocator_type{}) |
| | Construct the container with the contents of the range [first, last) More...
|
| |
| constexpr | basic_dynamic_array (const basic_dynamic_array &other) |
| | Construct the container using the contents of other. More...
|
| |
| constexpr | basic_dynamic_array (const basic_dynamic_array &other, const allocator_type &allocator) |
| | Construct the container using the contents of other. using allocator as the allocator. More...
|
| |
| constexpr | basic_dynamic_array (basic_dynamic_array &&other) noexcept |
| | Construct the container with the contents of the other using move semantic. After move, other is guarenteed to be empty(). More...
|
| |
| constexpr | basic_dynamic_array (basic_dynamic_array &&other, const allocator_type &alloc) |
| | Construct the container with the contents of the other using move semantic. Using alloc as the allocator for the new container. More...
|
| |
|
constexpr | ~basic_dynamic_array () noexcept |
| | Destructor.
|
| |
| constexpr auto | operator= (const basic_dynamic_array &rhs) -> basic_dynamic_array & |
| | Replaces the contents with an copy of the contents of rhs. More...
|
| |
| constexpr auto | operator= (basic_dynamic_array &&rhs) noexcept -> basic_dynamic_array & |
| | Replaces the contents with those of other using move semantics. More...
|
| |
| constexpr auto | operator= (std::initializer_list< Any > init_list) -> basic_dynamic_array & |
| | Replaces the contents with those identified by initializer list init_list. More...
|
| |
| constexpr auto | allocator () const noexcept -> allocator_type |
| | Returns the allocator associated with the container. More...
|
| |
| constexpr auto | lookup (size_type index) -> reference |
| | Access the object stored at a specific index. More...
|
| |
| constexpr auto | lookup (size_type index) const -> const_reference |
| | Access the object stored at a specific index. More...
|
| |
| constexpr auto | data () noexcept -> pointer |
| | Access the data stored by the container. More...
|
| |
| constexpr auto | data () const noexcept -> const_pointer |
| | Access the data stored by the container. More...
|
| |
| constexpr auto | begin () noexcept -> iterator |
| | Returns an iterator to the first element of the basic_dynamic_array. More...
|
| |
| constexpr auto | begin () const noexcept -> const_iterator |
| | Returns an iterator to the first element of the basic_dynamic_array. More...
|
| |
| constexpr auto | cbegin () const noexcept -> const_iterator |
| | Returns an iterator to the first element of the basic_dynamic_array. More...
|
| |
| constexpr auto | end () noexcept -> iterator |
| | Get an iterator to the element following the last element of the basic_dynamic_array. More...
|
| |
| constexpr auto | end () const noexcept -> const_iterator |
| | Return an iterator to the element following the last element of the basic_dynamic_array. More...
|
| |
| constexpr auto | cend () const noexcept -> const_iterator |
| | Returns an it iterator to the element following the last element of the basic_dynamic_array. More...
|
| |
| constexpr auto | rbegin () noexcept -> reverse_iterator |
| | Returns a reverse iterator to the first element of the reversed basic_dynamic_array. It corresponds to the last element of the non-reversed basic_dynamic_array. If the basic_dynamic_array is empty, the returned iterator is equal to rend(). More...
|
| |
| constexpr auto | rbegin () const noexcept -> const_reverse_iterator |
| | Returns a reverse_iterator to the first element of the reversed basic_dynamic_array. It corresponds to the last element of the non-reversed basic_dynamic_array. If the basic_dynamic_array is empty, the returned iterator is equal to rend(). More...
|
| |
| constexpr auto | rcbegin () const noexcept -> const_reverse_iterator |
| | Returns a reverse iterator to the first element of the reversed basic_dynamic_array. It corresponds to the last element of the non-reversed basic_dynamic_array. If the basic_dynamic_array is empty, the returned iterator is equal to rend(). More...
|
| |
| constexpr auto | rend () noexcept -> reverse_iterator |
| | Returns a reverse iterator to the element following the last element of the reversed basic_dynamic_array. It corresponds to the element preceding the first element of the non-reversed basic_dynamic_array. This element acts as a placeholder, attempting to access it results in UB. More...
|
| |
| constexpr auto | rend () const noexcept -> const_reverse_iterator |
| | Returns a reverse iterator to the element following the last element of the reversed basic_dynamic_array. It corresponds to the element preceding the first element of the non-reversed basic_dynamic_array. This element acts as a placeholder, attempting to access it results in UB. More...
|
| |
| constexpr auto | rcend () const noexcept -> const_reverse_iterator |
| | Returns a reverse iterator to the element following the last element of the reversed basic_dynamic_array. It corresponds to the element preceding the first element of the non-reversed basic_dynamic_array. This element acts as a placeholder, attempting to access it results in UB. More...
|
| |
| constexpr auto | empty () const noexcept -> bool |
| | Check if the basic_dynamic_array is empty. More...
|
| |
| constexpr auto | size () const noexcept -> size_type |
| | Check the number of elements stored in the basic_dynamic_array. More...
|
| |
| constexpr auto | capacity () const noexcept -> size_type |
| | Check the number of elements that the basic_dynamic_array has currently allocated space for. More...
|
| |
| constexpr void | reserve (size_type new_cap) |
| | Increase the capacity of the vector to a value that's greater or equal to new_cap. If new_ap is greater than the current capacity(), new storage is allocated, otherwise the method does nothing. If reallocated occurs, all current iterators are invalidated. More...
|
| |
|
constexpr void | clear () noexcept |
| | Erases all elements from the container, After this call, size() returs zero.
|
| |
| constexpr auto | insert (const_iterator pos, const_reference value) -> iterator |
| | Inserts an element value at the position before pos in the container. More...
|
| |
| constexpr auto | insert (const_iterator pos, value_type &&value) -> iterator |
| | Inserts an element value at the position before pos in the container. More...
|
| |
| template<typename... Args> |
| constexpr auto | insert (const_iterator pos, Args... args) -> iterator |
| | Insert a new element into the container directly before pos. The element is constructed in-place using the arguments Args... that are forwarded to the constructor. More...
|
| |
| constexpr auto | insert (const_iterator pos, size_type count, const_reference value) -> iterator |
| | Inserts count elements from a specified value. More...
|
| |
| template<std::input_iterator InputIt> |
| constexpr auto | insert (const_iterator pos, InputIt first, InputIt last) -> iterator |
| | Inserts elements from a range [first, last) before pos. More...
|
| |
| constexpr auto | insert (const_iterator pos, std::initializer_list< value_type > init_list) -> iterator |
| | Insert elements from an initializer_list before the position pos. More...
|
| |
| constexpr auto | erase (const_iterator pos) -> iterator |
| | Erases the specified element from the container. More...
|
| |
| constexpr auto | erase (const_iterator first, const_iterator last) -> iterator |
| | Erases the specified elements from the container. More...
|
| |
| constexpr void | append (const value_type &value) |
| | Appends the given element value to the end of the container. The new element is initialized as a copy of value. More...
|
| |
| constexpr void | append (value_type &&value) |
| | Appends the given element value to the end of the container. Value is moved into the new element. More...
|
| |
| template<typename... Args> |
| requires constexpr std::constructible_from< value_type, Args... > auto | append (in_place_t, Args &&... args) -> reference |
| | Appends the given element value to the end of the container. The element is constructed in-place using the arguments Args... that are forwarded to the constructor. More...
|
| |
| constexpr void | pop_back () |
| | Removes the last element in the container. More...
|
| |
| constexpr void | resize (size_type count) |
| | Resizes the container to contain count elements. If the current size is greater than count, the container is reduced to its first count elements. If the current size is less than count, default constructed elements are appended. More...
|
| |
| constexpr void | resize (size_type count, const_reference value) |
| | Resizes the container to contain count elements. If the current size is greater than count, the container is reduced to its first count elements. If the current size is less than count, additional copies of value are appended. More...
|
| |
template<typename Any, i64_t Size, typename Allocator = memory_allocator<Any>>
class caramel::basic_dynamic_array< Any, Size, Allocator >
A resizable array with a small statically allocated storage buffer.
- Author
- wmbat wmbat.nosp@m.@pro.nosp@m.tonma.nosp@m.il.c.nosp@m.om
- Date
- Sunday, 13th of december 2020
- Copyright
- MIT License
- Template Parameters
-
| Any | The type of the elements |
| Size | The size of the staticly allocated small buffer. |
| Allocator | The allocator that is used to acquire/release and construct/destroy the elements in that memory. |