Files
2025-10-25 03:02:53 +03:00

31 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[cmp.result]
# 17 Language support library [[support]](./#support)
## 17.12 Comparisons [[cmp]](cmp#result)
### 17.12.5 Result of three-way comparison [cmp.result]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L5460)
The behavior of a program
that adds specializations for the compare_three_way_result template
defined in this subclause is undefined[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L5465)
For the compare_three_way_result type trait
applied to the types T and U,
let t and u denote lvalues of typesconst remove_reference_t<T> and const remove_reference_t<U>,
respectively[.](#2.sentence-1)
If the expression t <=> u is well-formed
when treated as an unevaluated operand ([[expr.context]](expr.context "7.2.3Context dependence")),
the member [*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4The typedef specifier[dcl.typedef]") type denotes the type decltype(t <=> u)[.](#2.sentence-2)
Otherwise, there is no member type[.](#2.sentence-3)