http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46733
Summary: [c++0x] member function template is used for copy-construction when it should not Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ro...@binarylife.net Compiling the following invalid program GCC violates 12.8/7 "A member function template is never instantiated to perform the copy of a class object to an object of its class type." $ cat test.cpp #include <cstdlib> struct X { X()=default; X(X&&)=default; template<typename Y> X(Y const&) { abort(); } }; int main() { X a={}; X b(a); return 0; } $ g++ -std=c++0x test.cpp && ./a.out Aborted