// { dg-do compile } // Origin: Giovanni Bajo // DR152: explicit copy constructors namespace N1 { struct X { X(); explicit X(const X&); }; void f(X); int foo() { X x; f(x); // { dg-error "" "" } } } namespace N2 { template struct X { X(); explicit X(const X&); }; template void f(T ) {} template int foo() { X x; N2::f(x); // { dg-error "" "" } } template int foo(); // { dg-error "instantiated from here" } }