// Testcase from P0512R0 for C++17 NB comment US 19 // { dg-do compile { target c++17 } } template struct remove_ref; template struct remove_ref { typedef _Tp type; }; template struct remove_ref<_Tp&> { typedef _Tp type; }; template struct remove_ref<_Tp&&> { typedef _Tp type; }; template using remove_ref_t = typename remove_ref<_Tp>::type; template struct A { A(T, int*); // #1 A(A&, int*); // #2 enum { value }; }; template::value> A(T&&, int*) -> A; //#3 A a{1,0}; // uses #1 to deduce A and initializes with #1 A b{a,0}; // uses #2 to deduce A and initializes with #2 template struct same; template struct same {}; same> s1; same> s2;