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

From cppreference.com
< cpp‎ | container‎ | span

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() == other.data() and size() == other.size().

### Parameters

other | - | another span to copy from

### Return value

*this.

### See also

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

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/container/span/operator%3D&oldid=104939"