Skip to content

Commit 963cec4

Browse files
committed
[expr.add] Simplify phrasing around ptrdiff_t and avoid redundancy
1 parent 1175936 commit 963cec4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

source/expressions.tex

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7201,15 +7201,10 @@
72017201
\end{note}
72027202

72037203
\pnum
7204-
\indextext{\idxcode{ptrdiff_t}!implementation-defined type of}%
7205-
\indextext{subtraction!implementation-defined pointer}%
72067204
\indextext{\idxcode{ptrdiff_t}}%
72077205
\indextext{comparison!undefined pointer}%
7208-
When two pointer expressions \tcode{P} and \tcode{Q} are subtracted,
7209-
the type of the result is an \impldef{type of \tcode{ptrdiff_t}} signed
7210-
integral type; this type shall be the same type that is named by
7211-
\tcode{std::ptrdiff_t} in the \libheader{cstddef}
7212-
header\iref{support.types.layout}.
7206+
The result of subtracting two pointer expressions \tcode{P} and \tcode{Q}
7207+
is a prvalue of type \tcode{std::ptrdiff_t}\iref{support.types.layout}.
72137208
\begin{itemize}
72147209
\item If \tcode{P} and \tcode{Q} both evaluate to null pointer values,
72157210
the result is 0.

0 commit comments

Comments
 (0)