cpp / latest / ranges / transform_view / deduction_guides.html /

deduction guides for std::ranges::transform_view

template< class R, class F >
transform_view( R&&, F ) -> transform_view<views::all_t<R>, F>;
(since C++20)

The deduction guide is provided for std::ranges::transform_view to allow deduction from range and transformation function.

If R is a view, the deduced type is transform_view<R, F>; otherwise, the deduced type is usually transform_view<ranges::ref_view<R>, F>.

Example

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/ranges/transform_view/deduction_guides