Constructs a span wrapping a mutable container (transform by copy).

Synopsis

Declared in <absl/types/any_span.h>

template<
    typename Container,
    typename Transform,
    typename = Container,
    typename = EnableIfContainer<Container>,
    typename = EnableIfTransformIsValid<Transform, decltype(std::declval<Container&>()[0])>,
    EnableIfTransformIsByCopy<Transform> = true>
constexpr
explicit
AnySpan(
    Container& container,
    Transform const& transform);

Description

Only enabled when T is mutable. The transform, container, and its storage must outlive this span; reallocating or resizing the container invalidates the span.

Parameters

Name

Description

container

The container whose elements the span refers to.

transform

Functor applied to each element on access.

Created with MrDocs