New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[expr.prim.req] Fix uses of 'unevaluated operand' #4832
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this looks good to me, but I have one concern:
I wonder if there are any complications here that would suggest we treat nested-requirements as unevaluated operands. I ask because we do treat the constraint-logical-or-expression of a requires-clause as an unevaluated operand, and it might make sense to be consistent. But I'm not sure how to square that with the disallowance of a requires-expression parameter appearing in a potentially-evaluated context.
Maybe we need CWG to take a look. It seems like we're overloading "unevaluated operand" to mean two different things here, and a nested requirement is unevaluated in only one of the two senses.
@zygoloid: Well, as it stands with my rewrite, the constraint-expression of a nested-requirement is NOT an unevaluated operand. Which allows us to talk about "potentially evaluated". I'm unsure what we want here. Is there a minor fix that we could apply so that my patch can go forward, and we punt the rest to CWG? |
I think we can fix the first part of #4830 editorially, since that seems to just be confusion between two similar terms: [expr.prim.req.nested]p2: " However, given the larger issue here -- which seems core-ish to me -- I'm not sure that's the right approach. So perhaps we should punt the whole thing to core? |
Fixes #4830