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]

Re: g++ 2.95.2 cannot resolve a return-type template function overload


> 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


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