This is the mail archive of the gcc@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: something wrong with template instantiation mechanics


>>>>> 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


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