Spec-Zone.ru › C++

std::indirectly_unary_invocable, std::indirectly_regular_unary_invocable

Определено в заголовке <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>>>;
(с C++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>>>;
(с C++20)

Концепции indirectly_unary_invocable и indirectly_regular_unary_invocable задают требования к алгоритмам, которые используют (регулярные) унарные вызываемые объекты в качестве аргументов. Ключевое различие между этими концепциями и std::invocable заключается в том, что они применяются к типу, на который ссылается I, а не к самому I.

Семантические требования

Каждая концепция моделируется F и I только в том случае, если моделируются все подчинённые ей концепции.

Примечания

Различие между indirectly_unary_invocable и indirectly_regular_unary_invocable чисто семантическое.

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/iterator/indirectly_unary_invocable

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API