absl::MakeAnySpan

Constructs an AnySpan from a view container or array.

Synopsis

Declared in <absl/types/any_span.h>

template<
    int& ExplicitArgumentBarrier...,
    typename Container,
    typename T = any_span_internal::ElementType<Container>>
AnySpan<T>
MakeAnySpan(Container& c)
requires absl::type_traits_internal::IsView<std::remove_cv_t<Container>>::value;

Return Value

An AnySpan over the elements of c.

Parameters

NameDescription
cThe container whose elements the span refers to.