This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR c++/42260


On 12/14/2009 12:31 PM, Dodji Seketeli wrote:
+struct A
+{
+      template<typename T>  operator T*();
+};
+
+int i = *A();// { dg-error "cannot convert 'T' to 'int' in initialization" }

This shouldn't get as far as looking for a conversion from T to int; the code that looks for a conversion from A to something* should complain about choosing a template.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]