23 Iterators library [iterators]

23.3 Iterator requirements [iterator.requirements]

23.3.6 Indirect callable requirements [indirectcallable]

23.3.6.1 General [indirectcallable.general]

There are several concepts that group requirements of algorithms that take callable objects ([func.def]) as arguments.

23.3.6.2 Indirect callables [indirectcallable.indirectinvocable]

The indirect callable concepts are used to constrain those algorithms that accept callable objects ([func.def]) as arguments.
namespace std { template<class F, class I> concept indirectly_­unary_­invocable = indirectly_­readable<I> && copy_­constructible<F> && invocable<F&, iter_value_t<I>&> && invocable<F&, iter_reference_t<I>> && invocable<F&, iter_common_reference_t<I>> && common_­reference_­with< invoke_result_t<F&, iter_value_t<I>&>, invoke_result_t<F&, iter_reference_t<I>>>; template<class F, class I> concept indirectly_­regular_­unary_­invocable = indirectly_­readable<I> && copy_­constructible<F> && regular_­invocable<F&, iter_value_t<I>&> && regular_­invocable<F&, iter_reference_t<I>> && regular_­invocable<F&, iter_common_reference_t<I>> && common_­reference_­with< invoke_result_t<F&, iter_value_t<I>&>, invoke_result_t<F&, iter_reference_t<I>>>; template<class F, class I> concept indirect_­unary_­predicate = indirectly_­readable<I> && copy_­constructible<F> && predicate<F&, iter_value_t<I>&> && predicate<F&, iter_reference_t<I>> && predicate<F&, iter_common_reference_t<I>>; template<class F, class I1, class I2> concept indirect_­binary_­predicate = indirectly_­readable<I1> && indirectly_­readable<I2> && copy_­constructible<F> && predicate<F&, iter_value_t<I1>&, iter_value_t<I2>&> && predicate<F&, iter_value_t<I1>&, iter_reference_t<I2>> && predicate<F&, iter_reference_t<I1>, iter_value_t<I2>&> && predicate<F&, iter_reference_t<I1>, iter_reference_t<I2>> && predicate<F&, iter_common_reference_t<I1>, iter_common_reference_t<I2>>; template<class F, class I1, class I2 = I1> concept indirect_­equivalence_­relation = indirectly_­readable<I1> && indirectly_­readable<I2> && copy_­constructible<F> && equivalence_­relation<F&, iter_value_t<I1>&, iter_value_t<I2>&> && equivalence_­relation<F&, iter_value_t<I1>&, iter_reference_t<I2>> && equivalence_­relation<F&, iter_reference_t<I1>, iter_value_t<I2>&> && equivalence_­relation<F&, iter_reference_t<I1>, iter_reference_t<I2>> && equivalence_­relation<F&, iter_common_reference_t<I1>, iter_common_reference_t<I2>>; template<class F, class I1, class I2 = I1> concept indirect_­strict_­weak_­order = indirectly_­readable<I1> && indirectly_­readable<I2> && copy_­constructible<F> && strict_­weak_­order<F&, iter_value_t<I1>&, iter_value_t<I2>&> && strict_­weak_­order<F&, iter_value_t<I1>&, iter_reference_t<I2>> && strict_­weak_­order<F&, iter_reference_t<I1>, iter_value_t<I2>&> && strict_­weak_­order<F&, iter_reference_t<I1>, iter_reference_t<I2>> && strict_­weak_­order<F&, iter_common_reference_t<I1>, iter_common_reference_t<I2>>; }

23.3.6.3 Class template projected [projected]

Class template projected is used to constrain algorithms that accept callable objects and projections ([defns.projection]).
It combines a indirectly_­readable type I and a callable object type Proj into a new indirectly_­readable type whose reference type is the result of applying Proj to the iter_­reference_­t of I.
namespace std { template<indirectly_­readable I, indirectly_­regular_­unary_­invocable<I> Proj> struct projected { using value_type = remove_cvref_t<indirect_result_t<Proj&, I>>; indirect_result_t<Proj&, I> operator*() const; // not defined }; template<weakly_­incrementable I, class Proj> struct incrementable_traits<projected<I, Proj>> { using difference_type = iter_difference_t<I>; }; }