https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118398

--- Comment #8 from mauro russo <ing.russomauro at gmail dot com> ---
I see, it makes sense.

However, I hope not to be too tedious to ask explicit references for the rules
you stated:

a) ignore requirements on parameters not used in the evaluation of a concept.

b) ignore errors in non-immediate context during a clause if previous clauses
already determined (in terms of boolean combination among constraints) the
acceptance or rejection.


I am unable to find both of them.


In the current standard draft, I could find other topics we discussed:

§7.5.8.1 [expr.prim.req.general] - p5:

1) "... can result in the formation of invalid types or expressions in the
immediate context of its requirements ... In such cases, the
requires-expression evaluates to false; it does not cause the program to be
ill-formed."

Indeed, this confirms your statement that, for the erros in a lambda, the
'savage' does not apply and the program is ill-formed.


2) "... The substitution and semantic constraint checking proceeds in lexical
order and stops when a condition that determines the result of the
requires-expression is encountered."

This part is a kind of what I was looking for, about point b) above, but it
applies only to multiple requirements inside a single requires expression, that
is, not to multiple combined constraints.

About multiple combined constraints, I cannot find evidences of (b) from
sections as §13.5.3 [temp.constr.decl], §13.5.4 [temp.constr.normal], §13.5.5
[temp.constr.order]

Similary, I cannot find evidences of (a) from sections as §13.3 [temp.names],
where p9 reads:

"A concept-id is a simple-template-id where the template-name is a
concept-name. A concept-id is a prvalue of type bool, and does not name a
template specialization. A concept-id evaluates to true if the concept’s
normalized constraint-expression (13.5.3) is satisfied (13.5.2) by the
specified template arguments and false otherwise."

Reply via email to