Constructs a span wrapping a mutable container (transform by ref).
Declared in <absl/types/any_span.h>
template<
typename Container,
typename Transform = any_span_transform::IdentityT,
typename = Container,
typename = EnableIfContainer<Container>,
typename = EnableIfTransformIsValid<Transform, decltype(std::declval<Container&>()[0])>,
EnableIfTransformIsByRef<Transform> = true>
constexpr
explicit
AnySpan(
Container& container,
Transform const& transform = any_span_transform::Identity());
Only enabled when T is mutable. The transform, container, and its storage must outlive this span; reallocating or resizing the container invalidates the span.
| Name | Description |
|---|---|
| container | The container whose elements the span refers to. |
| transform | Functor applied to each element on access. |