Skip to content

Commit 22e81c5

Browse files
committed
[conv.lval] Determine the value of a constant without accessing an object
1 parent 22789a0 commit 22e81c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/expressions.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@
628628
names a variable \tcode{x} that is not odr-used by
629629
$E_\tcode{x}$\iref{basic.def.odr},
630630
\end{itemize}
631-
the value contained in the referenced object is not accessed.
631+
the object designated by $E$ is not accessed.
632632
\begin{example}
633633
\begin{codeblock}
634634
struct S { int n; };
@@ -661,6 +661,10 @@
661661
type, the conversion copy-initializes the result object from
662662
the glvalue.
663663

664+
\item Otherwise, if $E$ is a constant expression that designates an object
665+
that is usable in constant expressions ([expr.const]),
666+
the result is the value of that object.
667+
664668
\item Otherwise, if the object to which the glvalue refers contains an invalid
665669
pointer value~(\ref{basic.stc.dynamic.deallocation},
666670
\ref{basic.stc.dynamic.safety}), the behavior is

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy