From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Krivosheev To: Oleg Krivosheev Cc: Jason Merrill , egcs@cygnus.com Subject: something wrong with template instantiation mechanics Date: Thu, 09 Oct 1997 16:31:00 -0000 Message-id: References: <343CFFD0.A92198FF@msu.ru> X-SW-Source: 1997-10/msg00381.html Hi, i've tried my code and lloks like tons of small inline template functions are not instantiated. drabble ~ $ c++ -v Reading specs from /home/room1/kriol/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.12/specs gcc version egcs-2.90.12 971008 (gcc2-970802 experimental) drabble ~ $ uname -a SunOS drabble 5.5.1 Generic_103640-08 sun4m sparc SUNW,SPARCstation-4 in a simple example: #include "typedefs.H" #include "Vector3D.H" int main( void ) { return 0; } void superdummy( void ) { TVector3D ccc; ccc = 1.0; abs(ccc); } where abs(ccc) declared as template inline x abs( const TVector3D& y ); is not instantiated: c++ -c test.ii nm -s test.o | c++filt | grep abs U abs(TVector3D const &) i'd expect it to be instantiated and marked W i've enclosed full preprocessor output file. thanks OK