xte::array<T>::operator+()

Defined in header <xte/data/array.hpp>


Definitions

#0
[[nodiscard]] friend constexpr auto operator+(xte::is_derived_from<xte::array<T>> auto&& lhs, auto&& rhs) XTE_ARROW(/* ... */)
Appends elements to a copy of lhs with .push_range().

#1
template<typename Lhs>
requires(!xte::is_derived_from<Lhs, xte::array<T>>)
[[nodiscard]] friend constexpr auto operator+(xte::is_derived_from<xte::array<T>> auto&& lhs, auto&& rhs) XTE_ARROW(/* ... */)
Prepends elements to rhs with .insert_range().



Example

std::println("{}", xte::array { 1, 2 } + xte::array { 3, 4 });
Output:
[1, 2, 3, 4]
[View in Compiler Explorer]