Yes-- Just define the specialization of the function in the header file after the template definition. Like this: template <typename foo> class bar { public : int func1() { ... } int func2() { ... } ... } // Specialization of func2 in bar for class q template<> bar<q>::func2() { ... }