[PD-dev] C++ templates - question

Bryan Jurish moocow at ling.uni-potsdam.de
Wed Oct 13 13:43:36 CEST 2004


moin all,

On 13 October 2004 at 11:39:47, Thomas Grill appears to have written:
 > I'm not sure why this happens - i'm using templates all the time, and i find
 > the easiest solution to write all the implementations inside the class
 > declaration, like in
 > 
 > template<class T>
 > class hula
 > {
 >     public:
 >     hula(): a(0) {}
 >     T plus(T b) { return a+b; }
 >     private:
 >     T a;
 > };

as far as i know, you *have* to do it this way with templates;
that's why the STL is all header files...

marmosets,
	Bryan




More information about the Pd-dev mailing list