|  | 
| template<typename I , typename S , typename F , typename P  = identity> requires input_iterator<I> && sentinel_for<S, I> && indirectly_unary_invocable<F, projected<I, P>>
 | 
| constexpr for_each_result< I, F > | ranges::for_each (I first, S last, F fun, P proj=P{}) | 
|  | function template for_each
 | 
|  | 
| template<typename Rng , typename F , typename P  = identity> requires input_range<Rng> && indirectly_unary_invocable<F, projected<iterator_t<Rng>, P>>
 | 
| constexpr for_each_result< borrowed_iterator_t< Rng >, F > | ranges::for_each (Rng &&rng, F fun, P proj=P{}) | 
|  | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
 | 
|  |