An updated transform_view whose iterator constructs an F on the fly ‐‐ rather than using the one stored in the view ‐‐ when F can be trivially constructed and destructed. This makes this transform_view conditionally borrowable. Note that this template derives from <Stdref ref="view.interface"/>, and so has many operations not explicitly documented below.
Synopsis
Declared in <beman/transform_view/transform_view.hpp>
template<
std::ranges::input_range V,
std::move_constructible F>
requires std::ranges::view<V> && std::is_object_v<F> &&
std::regular_invocable<F&, std::ranges::range_reference_t<V> > &&
detail::can_ref<
std::invoke_result_t<F&, std::ranges::range_reference_t<V> > >
class transform_view
: public std::ranges::view_interface<transform_view<V, F>>