16 template <
typename T,
typename MemoryPolicy>
40 template <
typename T,
typename MemoryPolicy = default_memory_policy>
43 using impl_t = std::conditional_t<
44 MemoryPolicy::use_transient_rvalues,
49 std::integral_constant<bool, MemoryPolicy::use_transient_rvalues>;
74 array(std::initializer_list<T> values)
75 :
impl_{impl_t::from_initializer_list(values)}
82 template <
typename Iter,
typename Sent,
84 <detail::compatible_sentinel_v<Iter, Sent>
85 && detail::is_forward_iterator_v<Iter>,
bool> =
true>
87 :
impl_{impl_t::from_range(first, last)}
95 :
impl_{impl_t::from_fill(n, v)}
159 {
return impl_.get(index); }
168 {
return impl_.get_check(index); }
176 {
return !(*
this == other); }
194 {
return impl_.push_back(std::move(value)); }
216 {
return impl_.assoc(index, std::move(value)); }
238 template <
typename FnT>
240 {
return impl_.update(index, std::forward<FnT>(fn)); }
242 template <
typename FnT>
263 {
return impl_.take(elems); }
286 {
impl_.push_back_mut({}, std::move(value));
return std::move(*
this); }
288 {
return impl_.push_back(std::move(value)); }
291 {
impl_.assoc_mut({}, index, std::move(value));
return std::move(*
this); }
293 {
return impl_.assoc(index, std::move(value)); }
295 template <
typename Fn>
297 {
impl_.update_mut({}, index, std::forward<Fn>(fn));
return std::move(*
this); }
298 template <
typename Fn>
300 {
return impl_.update(index, std::forward<Fn>(fn)); }
303 {
impl_.take_mut({}, elems);
return std::move(*
this); }
305 {
return impl_.take(elems); }
reverse_iterator rend() const
const impl_t & impl() const
array push_back(value_type value) const &
reference operator[](size_type index) const
array push_back_move(std::false_type, value_type value)
std::conditional_t< MemoryPolicy::use_transient_rvalues, detail::arrays::with_capacity< T, MemoryPolicy >, detail::arrays::no_capacity< T, MemoryPolicy > > impl_t
std::ptrdiff_t difference_type
array && push_back_move(std::true_type, value_type value)
reference at(size_type index) const
reverse_iterator rbegin() const
array take_move(std::false_type, size_type elems)
const impl< T, B, MP > empty
MemoryPolicy memory_policy
std::integral_constant< bool, MemoryPolicy::use_transient_rvalues > move_t
array update_move(std::false_type, size_type index, Fn &&fn)
const T & const_reference
array && update_move(std::true_type, size_type index, Fn &&fn)
std::reverse_iterator< iterator > reverse_iterator
array(size_type n, T v={})
array update(std::size_t index, FnT &&fn) const &
bool operator!=(const array &other) const
array(std::initializer_list< T > values)
bool operator==(const array &other) const
array take(size_type elems) const &
array(Iter first, Sent last)
array && take_move(std::true_type, size_type elems)
array set_move(std::false_type, size_type index, value_type value)
array && set_move(std::true_type, size_type index, value_type value)