[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 29 01:17:49 PDT 2024


hokein wrote:

> @hokein Independently of the direction taken I'd like to see a better diagnostic than "atomic constraint using an undocumented/cryptic trait that is not in the code is not satisfied". 
> So when we try to print atomic constraints, we should do something more user friendly for is_deducible. (`note_atomic_constraint_evaluated_to_false` in `diagnoseWellFormedUnsatisfiedConstraintExpr` AFAICT). It might be a bit ad-hoc, but I think it's worth doing

I agree with you -- having a well-described diagnostic message is better and clearer. I'm happy to improve it once we settle on the final implementation approach (the current diagnostic `because '__is_deducible(AFoo, Foo<int>)' evaluated to false` seems okay to me. GCC also emits similar diagnostics).

By the way, other parts of this patch are ready for review.

https://github.com/llvm/llvm-project/pull/89358


More information about the cfe-commits mailing list