zyn0217 wrote:

> I have a reduced test case, which is accepted by clang 18, but fails with 
> this patch: https://gcc.godbolt.org/z/zMbKvsf7K
> A bit more compact one: https://gcc.godbolt.org/z/4rzYPKaze

Your case is rejected by all mainstream compilers as of now: 
https://gcc.godbolt.org/z/nrMf3zvfY
Again, it was an accept-invalid before because of the constant evaluation on 
dependent expressions, which **is** an assertion failure if you compile it with 
debug mode. https://gcc.godbolt.org/z/eascd7j1G

To clarify why the requirement should be evaluated to false:

> The enclosing _requires-expression_ will evaluate to false if substitution of 
> template arguments into the expression fails.

https://eel.is/c++draft/expr.prim.req#simple-1.sentence-2


https://github.com/llvm/llvm-project/pull/83997
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to