From: Philip B. <ph...@es...> - 2001-06-14 00:30:55
|
I have decided that templates aren't worth the trouble for this particular application. I think I'll stick to type casts. ----- Original Message ----- From: "David Levine" <le...@cs...> To: "Mingw list" <min...@li...> Sent: Wednesday, June 13, 2001 9:25 AM Subject: Re: [Mingw-users] Template link errors (possibly on on topic) > "Philip Bock" writes: > > > When I compile a program containing this function: > > > > template <class T> T std_degrees(T degrees) > > { > > if (degrees > 359) > > return ((int) degrees) % 360; > > else if (degrees < 0) > > return (((int) degrees) % -360) + 360; > > return degrees; > > } > > > > which is declared in the header like this: > > > > template <class T> T std_degrees(T degrees); > > Does that header #include the file that defines the function? > It needs to with the default template instantiation model; see > the "Where's the Template" discussion in the gcc info page. > > David > > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options at: > http://lists.sourceforge.net/lists/listinfo/mingw-users |