Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::v3::view::slice_fn Struct Reference

Synopsis of methods

constexpr view< slice_fnslice {}
 

Public Member Functions

 assert (0<=from)
 
 assert (from<=distance(rng)+to.dist_)
 
template<typename Rng , requires = (InputRange<Rng>())>
auto operator() (Rng &&rng, range_difference_type_t< Rng > from, range_difference_type_t< Rng > to) const -> decltype(slice_fn::invoke_(static_cast< Rng &&>(rng), from, to - from, range_concept< Rng >
 
template<typename Rng , requires = (InputRange<Rng>() && SizedRange<Rng>())>
auto operator() (Rng &&rng, range_difference_type_t< Rng > from, detail::from_end_< range_difference_type_t< Rng >> to) const -> decltype(slice_fn::invoke_(static_cast< Rng &&>(rng), from, distance(rng)+to.dist_ - from, range_concept< Rng >
 
template<typename Rng , requires = ((InputRange<Rng>() && SizedRange<Rng>()) || ForwardRange<Rng>())>
auto operator() (Rng &&rng, detail::from_end_< range_difference_type_t< Rng >> from, detail::from_end_< range_difference_type_t< Rng >> to) const -> decltype(slice_fn::invoke_(static_cast< Rng &&>(rng), from.dist_, to.dist_ - from.dist_, range_concept< Rng >
 
return slice_fn::invoke_ (static_cast< Rng &&>(rng), from, to - from, range_concept< Rng >{})
 
return slice_fn::invoke_ (static_cast< Rng &&>(rng), from, distance(rng)+to.dist_ - from, range_concept< Rng >{})