Constructs a span wrapping an initializer list, applying a transform.
Synopsis
Declared in <absl/types/any_span.h>
template<
typename Element,
typename Transform,
typename = EnableIfTransformIsValid<Transform, Element const&>,
EnableIfTransformIsByCopy<Transform> = true>
constexpr
AnySpan(
std::initializer_list<Element> l,
Transform const& transform);
Description
Useful for a list of a type other than value_type. The transform is taken by copy. 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