// Testcase from P1814R0 // { dg-do compile { target c++2a } } template struct identity { using type = T; }; template using identity_t = typename identity::type; template concept Int = __is_same_as (T, int); template struct C { C(T, U); // #1 { dg-message "constraint" } }; template C(T, U) -> C>; // #2 { dg-message "constraint" } template using A = C; template using B = A; int i{}; double d{}; A a1(&i, &i); // { dg-bogus "" "Deduces A" } A a2(i, i); // { dg-error "" "cannot deduce V * from i" } A a3(&i, &d); // { dg-error "" } #1: Cannot deduce (V*, V*) from (int *, double *) // #2: Cannot deduce A from C B b1(&i, &i); // { dg-bogus "" "Deduces B" } B b2(&d, &d); // { dg-error "" "cannot deduce B from C" }