SysTutorials

Linux Manual Pages › Section 3

stdcommon_comparison_category(3)

std::common_comparison_category - std::common_comparison_category

Synopsis

Defined in header<compare>
    template <class... Ts>
    struct common_comparison_category {
    (since C++ 20)
        using type = /*see below*/;
};

The class template std::common_comparison_category provides an alias (as the member typedef type) for the strongest comparison category to which all of the template arguments Ts… can be converted. In detail, the common comparison type of a list of n types T0…Tn-1 is defined as follows:

Template parameters

…Ts - a possibly empty list of types

Helper template

template< class… Ts > (since C++20) using common_comparison_category_t = typename common_comparison_category<Ts…>::type;

Member types

Member type Definition type the strongest common comparison category (as defined above)

Example

 This section is incomplete  Reason: no example

See also

strong_ordering the result type of 3-way comparison that supports all 6 operators and is substitutable                  (class) (C++20) weak_ordering the result type of 3-way comparison that supports all 6 operators and is not substitutable                  (class) (C++20) partial_ordering the result type of 3-way comparison that supports all 6 operators, is not substitutable, and allows incomparable values                  (class) (C++20) strong_equality the result type of 3-way comparison that supports only equality/inequality and is substitutable                  (class) (C++20) weak_equality the result type of 3-way comparison that supports only equality/inequality and is not substitutable                  (class) (C++20)