std::span<T,Extent>:: front
|
constexpr
reference front
(
)
const
;
|
(since C++20) | |
Returns a reference to the first element in the span.
|
If
|
(until C++26) |
|
If
|
(since C++26) |
Contents |
Return value
A reference to the first element.
Complexity
Constant.
Notes
For a span c , the expression c. front ( ) is equivalent to * c. begin ( ) .
Example
Output:
0 1 2 3
See also
|
access the last element
(public member function) |