MakeConstSpan overloads
Synopses
Declared in <absl/types/span.h>
Constructs a Span<const T> from a view container.
template<
int& ExplicitArgumentBarrier...,
typename C>
constexpr
decltype(MakeSpan(c))
MakeConstSpan(C const& c) noexcept
requires span_internal::IsView<C>::value;
Constructs a Span<const T> from a non‐view container.
template<
int& ExplicitArgumentBarrier...,
typename C>
constexpr
decltype(MakeSpan(c))
MakeConstSpan(C const& c) noexcept
requires !span_internal::IsView<C>::value;
Constructs a Span<const T> from a non‐view container.
template<
int& ExplicitArgumentBarrier...,
typename C>
constexpr
decltype(MakeSpan(c))
MakeConstSpan(C const& c) noexcept
requires !span_internal::IsView<C>::value;
Constructs a Span<const T> from a C array.
template<
int& ExplicitArgumentBarrier...,
typename T,
size_t N>
constexpr
Span<T const>
MakeConstSpan(T const(& array)[]) noexcept;
Constructs a Span<const T> from a [begin, end)] pointer pair.
template<
int& ExplicitArgumentBarrier...,
typename T>
Span<T const>
MakeConstSpan(
T* begin,
T* end) noexcept;
Constructs a Span<const T> from a pointer and a size.
template<
int& ExplicitArgumentBarrier...,
typename T>
constexpr
Span<T const>
MakeConstSpan(
T* ptr,
size_t size) noexcept;
Return Value
-
A read‐only span over the elements of
c. -
A read‐only span over all elements of
array. -
A read‐only span over the range
[begin, end)]. -
A read‐only 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