Specialization of template method - what's wrong with my code?
Posted
by Vincenzo
on Stack Overflow
See other posts from Stack Overflow
or by Vincenzo
Published on 2010-05-20T06:56:25Z
Indexed on
2010/05/20
7:00 UTC
Read the original article
Hit count: 251
c++
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?
© Stack Overflow or respective owner