diff --git a/source/expressions.tex b/source/expressions.tex index 2bfc4057de..15ab1211a4 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7201,18 +7201,13 @@ \end{note} \pnum -\indextext{\idxcode{ptrdiff_t}!implementation-defined type of}% -\indextext{subtraction!implementation-defined pointer}% \indextext{\idxcode{ptrdiff_t}}% \indextext{comparison!undefined pointer}% -When two pointer expressions \tcode{P} and \tcode{Q} are subtracted, -the type of the result is an \impldef{type of \tcode{ptrdiff_t}} signed -integral type; this type shall be the same type that is named by -\tcode{std::ptrdiff_t} in the \libheader{cstddef} -header\iref{support.types.layout}. +The result of subtracting two pointer expressions \tcode{P} and \tcode{Q} +is a prvalue of type \tcode{std::ptrdiff_t}\iref{support.types.layout}. \begin{itemize} \item If \tcode{P} and \tcode{Q} both evaluate to null pointer values, -the result is 0. +the value is 0. \item Otherwise, if \tcode{P} and \tcode{Q} point to, respectively, array elements $i$ and $j$ of the same array object \tcode{x},