something wrong with template instantiation mechanics
Jason Merrill
jason@cygnus.com
Fri Oct 10 11:44:00 GMT 1997
>>>>> Oleg Krivosheev <kriol@fnal.gov> writes:
> after reading CD2 and thinking a bit i still
> believe this is a bug:
> 14.8.3 Overload resolution [temp.over]
> ..
> For each function template, if the argument
> deduction succeeds, the deduced template-arguments are used to instan-
> tiate a single function template specialization which is added to the
> candidate functions set to be used in overload resolution.
> ..
> well, lloks like egcs deduces templates argument right,
Yes.
> then it properly did everload resolution and
> choose template version of abs
No. It chose the non-template abs declared by the line
friend numT abs( const TVector3D<numT>& );
Jason
More information about the Gcc
mailing list