MakeSpan overloads
Synopses
Declared in <absl/types/span.h>
Constructs a mutable Span from a view container.
template<
int& ExplicitArgumentBarrier...,
typename C>
constexpr
decltype(absl::MakeSpan(span_internal::GetData(c),
c.size()))
MakeSpan(C& c) noexcept
requires span_internal::IsView<C>::value;
Constructs a mutable Span from a non‐view container.
template<
int& ExplicitArgumentBarrier...,
typename C>
constexpr
decltype(absl::MakeSpan(span_internal::GetData(c),
c.size()))
MakeSpan(C& c) noexcept
requires !span_internal::IsView<C>::value;
Constructs a mutable Span from a non‐view container.
template<
int& ExplicitArgumentBarrier...,
typename C>
constexpr
decltype(absl::MakeSpan(span_internal::GetData(c),
c.size()))
MakeSpan(C& c) noexcept
requires !span_internal::IsView<C>::value;
Constructs a mutable Span<T> from a C array.
Constructs a mutable Span<T> from a [begin, end)] pointer pair.
Constructs a mutable Span<T> from a pointer and a size.
Return Value
-
A span over the elements of
c. -
A span over all elements of
array. -
A span over the range
[begin, end)]. -
A span over
sizeelements starting atptr.
Parameters
Name |
Description |
c |
The container whose data the span refers to. |
array |
The array whose elements the span refers to. |
begin |
Pointer to the first element. |
end |
Pointer just past the last element. |
ptr |
Pointer to the first element. |
size |
Number of elements. |
Created with MrDocs