Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/container/span/operator="

From cppreference.com
< cpp‎ | container‎ | span
(+)
m (link to zh)
Line 22: Line 22:
 
{{dsc inc | cpp/container/span/dsc size}}
 
{{dsc inc | cpp/container/span/dsc size}}
 
{{dsc end}}
 
{{dsc end}}
 +
 +
{{langlinks|zh}}

Revision as of 18:39, 19 March 2018

 
 
 
 
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

orphaned, replaced with Template:cpp/container/dsc data.
constructs a span
(public member function) [edit]
(C++20)
returns the number of elements in the sequence
(public member function) [edit]