File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 5518
5518
A pointer value $ P$ is
5519
5519
\indextext {value!valid in the context of an evaluation}%
5520
5520
\defn {valid in the context of} an evaluation $ E$
5521
- if $ P$ is a null pointer value, or
5521
+ if $ P$ is a pointer to function or a null pointer value, or
5522
5522
if it is a pointer to or past the end of an object $ O$ and
5523
5523
$ E$ happens before the end of the duration of the region of storage for $ O$ .
5524
5524
If a pointer value $ P$ is used in an evaluation $ E$ and
Original file line number Diff line number Diff line change 336
336
\indextext {expression!reference}%
337
337
If an expression initially has the type `` reference to
338
338
\tcode {T}'' \iref {dcl.ref,dcl.init.ref }, the type is adjusted to
339
- \tcode {T} prior to any further analysis. The expression designates the
340
- object or function denoted by the reference, and the expression
341
- is an lvalue or an xvalue, depending on the expression.
339
+ \tcode {T} prior to any further analysis;
340
+ the value category of the expression is not altered.
341
+ Let $ X$ be the object or function denoted by the reference.
342
+ If a pointer to $ X$ would be valid in
343
+ the context of the evalution of the expression\iref {basic.fundamental },
344
+ the result designates $ X$ ;
345
+ otherwise, the behavior is undefined.
342
346
\begin {note }
343
347
Before the lifetime of the reference has started or after it has ended,
344
348
the behavior is undefined (see~\ref {basic.life }).
You can’t perform that action at this time.
0 commit comments