// { dg-do compile { target c++17 } } template struct A { A(T); // #1 A(const A&); // #2 }; template A(T) -> A; // #3 A a (42); // uses #3 to deduce A and initializes with #1 A b = a; // uses #2 (not #3) to deduce A and initializes with #2; #2 is more specialized template A(A) -> A>; // #4 A b2 = a; // uses #4 to deduce A> and initializes with #1; #4 is as specialized as #2 template struct same; template struct same {}; same> s1; same> s2; same>> s3;