This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ 2.95.2 cannot resolve a return-type template function overload
- To: sebor at my-deja dot com
- Subject: Re: g++ 2.95.2 cannot resolve a return-type template function overload
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sat, 29 Jan 2000 01:17:51 +0100
- CC: sebor at my-deja dot com, gcc-bugs at gcc dot gnu dot org, pedretti at roguewave dot com
- References: <MCPCHAFEJGNMHBAA@my-deja.com>
> But T, which is the only parameter of the second template, is
> explicitly specified in the call to foo<int>(0), so the second foo
> specialized on int with an int argument _is_ an exact match for the
> call. Otherwise there's no way to call the second foo.
This is correct, you cannot directly call the second foo
function. This is because the partial ordering mechanism does not take
the call into account, but operates independent from any call.
There is not much point arguing about usability here; I can't see why
this arrangement of templates is useful in the first place. Instead,
please try to find evidence in the C++ standard that this is indeed a
bug in g++.
Regards,
Martin