From 95981de1bff132d7190a896cacf8beef7a077e0e Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Mon, 5 Jun 2023 11:52:53 +0800 Subject: [PATCH] [expr.const] Check the result object of a prvalue --- source/expressions.tex | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index 54e40c91a9..1c6c798b9a 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -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