This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49637] template function overload incorrectly ambiguous
- From: "timothyjgiese at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 5 Jul 2011 18:02:28 +0000
- Subject: [Bug c++/49637] template function overload incorrectly ambiguous
- Auto-submitted: auto-generated
- References: <bug-49637-4@http.gcc.gnu.org/bugzilla/>
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. :(