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 authored Jun 5, 2023
1 parent 1be4801 commit 1bdc388
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 @@ -7764,38 +7764,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 value\iref{basic.indet},

\item
if the value is of pointer type, it contains
if the result object is of pointer type, it contains
the address of an object with static storage duration,
the address past the end of such an object\iref{expr.add},
the address of 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 1bdc388

Please sign in to comment.