================ @@ -108,8 +108,11 @@ struct Foo { Foo(T const (&)[N]); }; +// FIXME: Prefer non-canonical template arguments in the deduction guide? template <typename X, int Y> using Bar = Foo<X, sizeof(X)>; // expected-note {{candidate template ignored: couldn't infer template argument 'X'}} \ + // expected-note {{implicit deduction guide declared as 'template <typename X> Bar(Foo<type-parameter-0-0, sizeof(type-parameter-0-0)>) -> Foo<type-parameter-0-0, sizeof(type-parameter-0-0)>'}} \ + // expected-note {{implicit deduction guide declared as 'template <typename X> Bar(const type-parameter-0-0 (&)[sizeof(type-parameter-0-0)]) -> Foo<type-parameter-0-0, sizeof(type-parameter-0-0)>'}} \ // expected-note {{candidate template ignored: constraints not satisfied [with X = int]}} \ ---------------- hokein wrote:
Right, it is not great for constraints not written in the source code. If we print constraints (see my another comment), it will improve the situation. https://github.com/llvm/llvm-project/pull/96084 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits