[Bug c++/49637] template function overload incorrectly ambiguous
timothyjgiese at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 5 18:02:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49637
--- Comment #8 from Timothy J Giese <timothyjgiese at gmail dot com> 2011-07-05 18:02:26 UTC ---
(In reply to comment #7)
> (In reply to comment #5)
> > (In reply to comment #1)
> > > Created attachment 24686 [details]
> > > minimal test case
> >
> > IMO this is ambiguous.
>
> > When doing partial ordering, in both cases the 'T'
> > remains undeduced.
>
> That's OK; T doesn't need to be deduced, because it is explicitly passed in.
> Only the second argument needs to be deduced.
OH. I think I see what you are saying here. I now think that you're saying
"the partial ordering will try to deduce the arguments regardless of whether or
not you tell it not to deduce it."
Damn, I wouldn't have written the C++ standard that way.
I now have to tell people to specialize versions of
template< T_iterator, T_const_iterator, T_value_type >
instead of
template<T>
..and pray that their implementations do indeed use the right "T" for each of
the arguments. :(
More information about the Gcc-bugs
mailing list