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


On Thu, 9 Oct 1997, Oleg Krivosheev wrote:

> Date: Thu, 09 Oct 1997 22:17:58 -0500 (CDT)
> 
> On Thu, 9 Oct 1997, Joe Buck wrote:
> 
> > > i've tried my code and lloks like tons of
> > > small inline template functions are not
> > > instantiated.
> > 
> > I think that this is a consequence of the new rules: you have both
> > non-template and template abs functions.  Unfortunately, I'm confused
> > by the new rules and not sure what is really supposed to change; I
> > also think that there still may be some bugs in the code that implements
> > them.
> 
> sorry, i sent a bit misleading example - maybe you're right,
> i'm reading CD2 now.

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,
then it properly did everload resolution and
choose template version of abs and generated
call - but no function body itself is instantiated !

regards

OK



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