Constructs a span wrapping a const array, applying a transform (by ref).
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(
Element const* ptr,
size_type size,
Transform const& transform = any_span_transform::Identity());
Description
The transform must be a function object whose const operator() takes an Element and returns a reference to T or a compatible object. Both the transform and array must outlive this span.
Parameters
Name |
Description |
ptr |
Pointer to the first element. |
size |
Number of elements. |
transform |
Functor applied to each element on access. |
Created with MrDocs