Constructs a span wrapping an initializer list, applying a transform.

Synopsis

Declared in <absl/types/any_span.h>

template<
    typename Element,
    typename Transform = any_span_transform::IdentityT,
    typename = EnableIfTransformIsValid<Transform, Element const&>,
    EnableIfTransformIsByRef<Transform> = true>
constexpr
AnySpan(
    std::initializer_list<Element> l,
    Transform const& transform = any_span_transform::Identity());

Description

Useful for a list of a type other than value_type. The transform is held by reference. The initializer list must outlive this span.

Parameters

Name

Description

l

The initializer list whose elements the span refers to.

transform

Functor applied to each element on access.

Created with MrDocs