Skip to content

[expr.prim.req.nested] misuse of term "unevaluated operand" #4830

@zygoloid

Description

@zygoloid

[expr.prim.req.nested]p2: "A local parameter shall only appear as an unevaluated operand (7.2) within the constraint-expression."

This allows requires (T a) { requires sizeof(a) == 4; } but does not allow requires (T a) { requires sizeof(f(a)) == 4; }, because the term "unevaluated operand" only applies to the immediate operand of various contexts. I believe the intent here is "An unqualified-id naming a local parameter shall not be potentially evaluated." or similar.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions