Specialization of template method - what's wrong with my code?
- by Vincenzo
What's wrong with this code?
class School {
public:
template<typename T> size_t count() const;
private:
vector<Boy*> boys;
vector<Girl*> girls;
}
template<> size_t School::count<Boy>() const {
return boys.size();
}
My compile says that "specialization of .. after initialization". Could you please help?