|
5938 | 5938 | and applying \tcode{<=>} to the converted operands.
|
5939 | 5939 |
|
5940 | 5940 | \pnum
|
5941 |
| -If at least one of the operands is of pointer type and |
5942 |
| -the other operand is of pointer or array type, |
| 5941 | +If at least one of the operands is of object pointer type and |
| 5942 | +the other operand is of object pointer or array type, |
5943 | 5943 | array-to-pointer conversions\iref{conv.array},
|
5944 | 5944 | pointer conversions\iref{conv.ptr},
|
5945 | 5945 | and
|
|
5954 | 5954 |
|
5955 | 5955 | \pnum
|
5956 | 5956 | If the composite pointer type is an object pointer type,
|
5957 |
| -\tcode{p <=> q} is of type \tcode{std::strong_ordering}. |
| 5957 | +\tcode{p <=> q} is of type \tcode{std::strong_ordering} and |
| 5958 | +the result is defined in terms of the following rules: |
| 5959 | +\begin{itemize} |
| 5960 | +\item |
5958 | 5961 | If two pointer operands \tcode{p} and \tcode{q} compare equal\iref{expr.eq},
|
5959 | 5962 | \tcode{p <=> q} yields \tcode{std::strong_ordering::equal};
|
5960 |
| -if \tcode{p} and \tcode{q} compare unequal, |
| 5963 | +\item |
| 5964 | +otherwise, if \tcode{p} and \tcode{q} compare unequal, |
5961 | 5965 | \tcode{p <=> q} yields
|
5962 | 5966 | \tcode{std::strong_ordering::less}
|
5963 | 5967 | if \tcode{q} compares greater than \tcode{p}
|
5964 | 5968 | and
|
5965 | 5969 | \tcode{std::strong_ordering::greater}
|
5966 |
| -if \tcode{p} compares greater than \tcode{q}\iref{expr.rel}. |
5967 |
| -Otherwise, the result is unspecified. |
| 5970 | +if \tcode{p} compares greater than \tcode{q}\iref{expr.rel}; |
| 5971 | +\item |
| 5972 | +otherwise, the result is unspecified. |
| 5973 | +\end{itemize} |
5968 | 5974 |
|
5969 | 5975 | \pnum
|
5970 | 5976 | Otherwise, the program is ill-formed.
|
|
0 commit comments