From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Krivosheev To: Joe Buck Cc: Oleg Krivosheev , egcs team Subject: Re: something wrong with template instantiation mechanics Date: Fri, 10 Oct 1997 08:51:00 -0000 Message-id: References: <199710100207.TAA06042@atrus.synopsys.com> X-SW-Source: 1997-10/msg00406.html Hi, 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. Still i believe there are bugs in template instantiation - if you change superdummy in the atached test.ii to void superdummy( void ) { TVector3D ccc, ddd; ccc = 1.0; abs(ccc); ccc = ccc + ddd; } egcs will not be able instantiate op+( const TVector3D&, const TVector3D& ) ! drabble ~ $ nm -s test.o | c++filt | grep Vec 00000000 W TVector3D::~TVector3D(void) 00000000 W TVector3D::operator=(TVector3D const &) 00000000 W TVector3D::operator=(double) U operator+(TVector3D const &, TVector3D const &) 00000000 W TVector3D::TVector3D(void) U abs(TVector3D const &) there is no template/nontemplate op+ ix in the code. Can you verify this one? thanks OK