SysTutorials

Linux Manual Pages › Section 3

stdexperimentalrangescommon(3)

std::experimental::ranges::Common - std::experimental::ranges::Common

Synopsis

Defined in header<experimental / ranges / concepts>
    template <class T, class U>
    concept bool Common =
        Same<ranges::common_type_t<T, U>, ranges::common_type_t<U, T>> &&
        ConvertibleTo<T, ranges::common_type_t<T, U>> &&
        ConvertibleTo<U, ranges::common_type_t<T, U>> &&
        CommonReference<
            std::add_lvalue_reference_t<const T>, (ranges TS)
                                                      std::add_lvalue_reference_t<const U>> &&
        CommonReference<
            std::add_lvalue_reference_t<ranges::common_type_t<T, U>>,
            ranges::common_reference_t<
                std::add_lvalue_reference_t<const T>,
                std::add_lvalue_reference_t<const U>>>;

The concept Common<T, U> specifies that two types T and U share a common type (as computed by ranges::common_type_t) to which both can be converted. Common<T, U> is satisfied only if, given expressions t and u such that decltype((t)) is T and decltype((u)) is U,

See also

                 determine the common type of a set of types common_type (class template)                  determine the common reference type of a set of types common_reference (class template)                  specifies that two types share a common reference type CommonReference (concept)