xte ::array <T >::operator= ()
Defined in header <xte/data/array.hpp> Definitions
#0Copies elements fromconstexpr xte ::array <T >& operator= (const xte ::array <T >& other )& noexcept (false )requires (/* See below */ );
other . If they fit within the uninitialized elements in the current allocation, then reallocation is not performed. Requires that T is copy-constructible and copy-assignable.#1
Takes ownership of the underlying data fromconstexpr xte ::array <T >& operator= (xte ::array <T >&& other )& noexcept ;
other , effectively calling .reset () on it.#2
Copies qualifiers fromtemplate <std ::ranges ::input_range Range >constexpr xte ::array <T >& operator= (Range && range )& noexcept (false )requires (/* See below */ );
Range onto its element type. If Range satisfies std ::ranges ::sized_range <> and the range's elements fit within the currently allocated uninitialized elements, then reallocation is not performed. Requires that Range is not a reference to xte ::array <T > or is derived from it, and T is constructible from the range's elements and is move-assignable.Example
Output:xte ::array array = {5 };std ::println ("{}" ,0 [array .data ());
[View in Compiler Explorer]5