std::span<T,Extent>::operator= (3) - Linux Manuals

std::span<T,Extent>::operator=: std::span<T,Extent>::operator=


std::span<T,Extent>::operator= - std::span<T,Extent>::operator=


constexpr span& operator=( const span& other ) noexcept = default;

Assigns other to *this. This defaulted assignment operator performs a shallow copy of the data pointer and the size, i.e., after a call to this function, data() == and size() == other.size().


other - another span to copy from

Return value


See also

              constructs a span
constructor (public member function)
              returns a pointer to the beginning of the sequence of elements
data (public member function)
              returns the number of elements in the sequence
size (public member function)