This is the mail archive of the gcc-bugs@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]

[Bug c++/49637] template function overload incorrectly ambiguous


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49637

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-05 17:28:09 UTC ---
(In reply to comment #3)
> struct S { typedef int iterator; };
> template <typename T, typename U> void F( T, U   ) {}
> template <typename T>             void F( T, int ) {}
> int main()
> {
>   S::iterator i(42);
>   F< S::iterator >(i,1); // OK 4.6.0, 4.5.1, 4.4.3 
>   return 0;
> }
> 
> Since this works, then (IMO) the original minimal test case should work as
> well.

But that's not the same, T can be deduced here.


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