Skip to content

Commit

Permalink
[expr.const] Check the result object of a prvalue
Browse files Browse the repository at this point in the history
  • Loading branch information
frederick-vs-ja committed Oct 17, 2024
1 parent 0b296da commit 95981de
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7973,38 +7973,38 @@
A \defnadj{constant}{expression} is either
a glvalue core constant expression that refers to
an entity that is a permitted result of a constant expression (as defined below), or
a prvalue core constant expression whose value
a prvalue core constant expression whose result object\iref{basic.lval}
satisfies the following constraints:
\begin{itemize}
\item
if the value is an object of class type,
if the result object is an object of class type,
each non-static data member of reference type refers to
an entity that is a permitted result of a constant expression,

\item
if the value is an object of scalar type,
if the result object is an object of scalar type,
it does not have an indeterminate or erroneous value\iref{basic.indet},

\item
if the value is of pointer type, it is
if the result object is of pointer type, it is
a pointer to an object with static storage duration,
a pointer past the end of such an object\iref{expr.add},
a pointer to a non-immediate function,
or a null pointer value,

\item
if the value is of pointer-to-member-function type,
if the result object is of pointer-to-member-function type,
it does not designate an immediate function, and

\item
if the value is an object of class or array type,
each subobject satisfies these constraints for the value.
if the result object is an object of class or array type,
each subobject satisfies these constraints for the result object.
\end{itemize}
An entity is a
\defnx{permitted result of a constant expression}{constant expression!permitted result of}
if it is an
object with static storage duration that either is not a temporary object or is
a temporary object whose value satisfies the above constraints, or if
a temporary object that satisfies the above constraints, or if
it is a non-immediate function.
\begin{note}
A glvalue core constant expression
Expand Down

0 comments on commit 95981de

Please sign in to comment.