Files
cppdraft_translate/cppdraft/cmp/common.md
2025-10-25 03:02:53 +03:00

1.4 KiB
Raw Blame History

[cmp.common]

17 Language support library [support]

17.12 Comparisons [cmp]

17.12.3 Class template common_comparison_category [cmp.common]

1

#

The type common_comparison_category provides an alias for the strongest comparison category to which all of the template arguments can be converted.

[Note 1:

A comparison category type is stronger than another if they are distinct types and an instance of the former can be converted to an instance of the latter.

— end note]

🔗

template<class... Ts> struct common_comparison_category { using type = see below; };

2

#

Remarks: The member typedef-name type denotes the common comparison type ([class.spaceship]) of Ts..., the expanded parameter pack, orvoid if any element of Ts is not a comparison category type.

[Note 2:

This is std::strong_ordering if the expansion is empty.

— end note]