|
6040 | 6040 | and applying \tcode{<=>} to the converted operands.
|
6041 | 6041 |
|
6042 | 6042 | \pnum
|
6043 |
| -If at least one of the operands is of pointer type and |
6044 |
| -the other operand is of pointer or array type, |
| 6043 | +If at least one of the operands is of object pointer type and |
| 6044 | +the other operand is of object pointer or array type, |
6045 | 6045 | array-to-pointer conversions\iref{conv.array},
|
6046 | 6046 | pointer conversions\iref{conv.ptr},
|
6047 | 6047 | and
|
|
6053 | 6053 | If both of the operands are arrays,
|
6054 | 6054 | array-to-pointer conversions\iref{conv.array} are not applied.
|
6055 | 6055 | \end{note}
|
6056 |
| - |
6057 |
| -\pnum |
6058 |
| -If the composite pointer type is an object pointer type, |
6059 |
| -\tcode{p <=> q} is of type \tcode{std::strong_ordering}. |
| 6056 | +In this case, |
| 6057 | +\tcode{p <=> q} is of type \tcode{std::strong_ordering} and |
| 6058 | +the result is defined by the following rules: |
| 6059 | +\begin{itemize} |
| 6060 | +\item |
6060 | 6061 | If two pointer operands \tcode{p} and \tcode{q} compare equal\iref{expr.eq},
|
6061 | 6062 | \tcode{p <=> q} yields \tcode{std::strong_ordering::equal};
|
6062 |
| -if \tcode{p} and \tcode{q} compare unequal, |
| 6063 | +\item |
| 6064 | +otherwise, if \tcode{p} and \tcode{q} compare unequal, |
6063 | 6065 | \tcode{p <=> q} yields
|
6064 | 6066 | \tcode{std::strong_ordering::less}
|
6065 | 6067 | if \tcode{q} compares greater than \tcode{p}
|
6066 | 6068 | and
|
6067 | 6069 | \tcode{std::strong_ordering::greater}
|
6068 |
| -if \tcode{p} compares greater than \tcode{q}\iref{expr.rel}. |
6069 |
| -Otherwise, the result is unspecified. |
| 6070 | +if \tcode{p} compares greater than \tcode{q}\iref{expr.rel}; |
| 6071 | +\item |
| 6072 | +otherwise, the result is unspecified. |
| 6073 | +\end{itemize} |
6070 | 6074 |
|
6071 | 6075 | \pnum
|
6072 | 6076 | Otherwise, the program is ill-formed.
|
|
0 commit comments