This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Accepted as a DR at the November, 2024 meeting.]
(From submission#562.)
Subclause 7.5.8.1 [expr.prim.req.general] paragraph 2 specifies:
Arequires-expression is a prvalue of type bool whose value isdescribed below. Expressions appearing withinarequirement-body are unevaluated operands(7.2.3 [expr.context]).
Aconstant-expression used as a non-type template argument"appearing within" therequirement-body should not beconsidered an "unevaluated operand". Similarly, bodiesoflambda-expressions should not be in focus of "appearingwithin".
Proposed resolution (approved by CWG 2024-10-11):
Change in 7.2.3 [expr.context] paragraph 1 as follows:
In some contexts, unevaluated operands appear(7.5.8 [expr.prim.req]7.5.8.2 [expr.prim.req.simple],7.5.8.4 [expr.prim.req.compound], 7.6.1.8 [expr.typeid],7.6.2.5 [expr.sizeof], 7.6.2.7 [expr.unary.noexcept],9.2.9.6 [dcl.type.decltype], 13.1 [temp.pre],13.7.9 [temp.concept]). An unevaluated operand is not evaluated.
Change in 7.5.8.1 [expr.prim.req.general] paragraph 2 as follows:
Arequires-expression is a prvalue of type bool whose value isdescribed below.Expressions appearing withinarequirement-body are unevaluated operands(7.2.3 [expr.context]).
Change in 7.5.8.2 [expr.prim.req.simple] paragraph 1 as follows:
Asimple-requirement asserts the validity of an expression.Theexpression is an unevaluated operand.[Note 1: The enclosingrequires-expression will evaluateto false if substitution of template arguments into the expressionfails.The expression is an unevaluated operand(7.2.3 [expr.context]).—end note] ...
Change in 7.5.8.4 [expr.prim.req.compound] paragraph 1 as follows:
Acompound-requirement asserts properties of the expressionE.Theexpression is an unevaluated operand.Substitution of template arguments (if any) and verification ofsemantic properties proceed in the following order: