3#ifndef TETL_ARRAY_DYNAMIC_ARRAY_HPP
4#define TETL_ARRAY_DYNAMIC_ARRAY_HPP
22template <
typename T,
typename Allocator>
79 [[nodiscard]]
auto size() const ->
etl::
size_t {
return _size; }
81 [[nodiscard]]
auto data() -> T* {
return _ptr; }
83 [[nodiscard]]
auto data() const -> T const* {
return _ptr; }
85 [[nodiscard]]
auto begin() -> T* {
return _ptr; }
87 [[nodiscard]]
auto begin() const -> T const* {
return _ptr; }
#define TETL_NO_UNIQUE_ADDRESS
Definition attributes.hpp:41
constexpr auto move(InputIt first, InputIt last, OutputIt destination) -> OutputIt
Moves the elements in the range [first, last), to another range beginning at destination,...
Definition move.hpp:26
constexpr auto next(InputIt it, typename iterator_traits< InputIt >::difference_type n=1) -> InputIt
Return the nth successor of iterator it.
Definition next.hpp:14
constexpr struct etl::ranges::destroy_fn destroy
Definition adjacent_find.hpp:8
constexpr bool is_default_constructible_v
Definition is_default_constructible.hpp:26
constexpr auto exchange(T &obj, U &&newValue) noexcept(etl::is_nothrow_move_constructible_v< T > and etl::is_nothrow_assignable_v< T &, U >) -> T
Replaces the value of obj with new_value and returns the old value of obj.
Definition exchange.hpp:16
TETL_BUILTIN_PTRDIFF ptrdiff_t
etl::ptrdiff_t is the signed integer type of the result of subtracting two pointers.
Definition ptrdiff_t.hpp:14
constexpr auto uninitialized_fill(ForwardIt first, ForwardIt last, T const &value) -> void
Definition uninitialized_fill.hpp:13
TETL_BUILTIN_SIZET size_t
etl::size_t is the unsigned integer type of the result of the sizeof operator.
Definition size_t.hpp:14
static constexpr auto allocate(Alloc &a, size_type n)
Definition allocator_traits.hpp:97
static constexpr void deallocate(Alloc &a, pointer p, size_type n)
Definition allocator_traits.hpp:99
auto data() -> T *
Definition dynamic_array.hpp:81
auto begin() const -> T const *
Definition dynamic_array.hpp:87
auto end() const -> T const *
Definition dynamic_array.hpp:91
dynamic_array(dynamic_array const &other)=delete
Allocator allocator_type
Definition dynamic_array.hpp:25
etl::ptrdiff_t difference_type
Definition dynamic_array.hpp:27
etl::size_t size_type
Definition dynamic_array.hpp:26
auto operator=(dynamic_array const &other) -> dynamic_array &=delete
~dynamic_array()
Definition dynamic_array.hpp:71
auto data() const -> T const *
Definition dynamic_array.hpp:83
auto operator=(dynamic_array &&other) noexcept -> dynamic_array &
Definition dynamic_array.hpp:63
T * pointer
Definition dynamic_array.hpp:28
auto size() -> etl::size_t
Definition dynamic_array.hpp:77
dynamic_array(etl::size_t n, T const &value, Allocator alloc=Allocator())
Definition dynamic_array.hpp:40
auto end() -> T *
Definition dynamic_array.hpp:89
T const * const_pointer
Definition dynamic_array.hpp:29
auto begin() -> T *
Definition dynamic_array.hpp:85
dynamic_array(dynamic_array &&other) noexcept
Definition dynamic_array.hpp:56
auto size() const -> etl::size_t
Definition dynamic_array.hpp:79
dynamic_array(Allocator alloc)
Definition dynamic_array.hpp:35
dynamic_array(etl::size_t n, Allocator alloc=Allocator())
Definition dynamic_array.hpp:48
T value_type
Definition dynamic_array.hpp:24