
Using a Template Member Function
An ordinary class may have template member functions. In the following example, the class A declares a template member function called f(): class A{public: template T f(T t);}; You may define the template member function inside the class body, as in: class A{public: template T f(T t) { return t;}};