template<> class A{ //some class data };
I have seen this kind of code many times. what is the use of template<> in the ab
template<>
Doesn't look right. Now, you might have instead written:
template<> class A { // some stuff };
... which would be a template specialisation for type foo.