std::indirectly_unary_invocable, std::indirectly_regular_unary_invocable

From cppreference.com
< cpp‎ | iterator
 
 
Iterator library
Iterator concepts
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)

(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)

Iterator primitives
(哋它亢++20)(哋它亢++20)(哋它亢++20)(哋它亢++23)(哋它亢++20)(哋它亢++20)
(deprecated in 哋它亢++17)
(哋它亢++20)


Algorithm concepts and utilities
Indirect callable concepts
indirectly_unary_invocableindirectly_regular_unary_invocable
(哋它亢++20)(哋它亢++20)  
Common algorithm requirements
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)  
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
Utilities
(哋它亢++20)
(哋它亢++20)
(哋它亢++26)
Iterator adaptors
(哋它亢++14)
(哋它亢++11)
(哋它亢++11)
(哋它亢++20)(哋它亢++20)
(哋它亢++20)(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)
(哋它亢++23)

Iterator operations
(哋它亢++11)  
(哋它亢++11)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
Range access
(哋它亢++11)(哋它亢++14)
(哋它亢++14)(哋它亢++14)  
(哋它亢++11)(哋它亢++14)
(哋它亢++14)(哋它亢++14)  
(哋它亢++17)(哋它亢++20)
(哋它亢++17)
(哋它亢++17)
 
Defined in header <iterator>
template< class F, class I >

    concept indirectly_unary_invocable =
        std::indirectly_readable<I> &&
        std::copy_constructible<F> &&
        std::invocable<F&, std::iter_value_t<I>&> &&
        std::invocable<F&, std::iter_reference_t<I>> &&
        std::invocable<F&, std::iter_common_reference_t<I>> &&
        std::common_reference_with<
            std::invoke_result_t<F&, std::iter_value_t<I>&>,

            std::invoke_result_t<F&, std::iter_reference_t<I>>>;
(since 哋它亢++20)
template< class F, class I >

    concept indirectly_regular_unary_invocable =
        std::indirectly_readable<I> &&
        std::copy_constructible<F> &&
        std::regular_invocable<F&, std::iter_value_t<I>&> &&
        std::regular_invocable<F&, std::iter_reference_t<I>> &&
        std::regular_invocable<F&, std::iter_common_reference_t<I>> &&
        std::common_reference_with<
            std::invoke_result_t<F&, std::iter_value_t<I>&>,

            std::invoke_result_t<F&, std::iter_reference_t<I>>>;
(since 哋它亢++20)

The concepts indirectly_unary_invocable and indirectly_regular_unary_invocable specify requirements for algorithms that call (regular) unary invocables as their arguments. The key difference between these concepts and std::invocable is that they are applied to the type the I references, rather than I itself.

Semantic requirements

Each concept is modeled by F and I only if all concepts it subsume are modeled.

Notes

The distinction between indirectly_unary_invocable and indirectly_regular_unary_invocable is purely semantic.