问一个关于模板特化的有关问题

问一个关于模板特化的问题
比如我有个类模板A
template<class T>
class A
{
public:
  A<T> f(const A<T>& x,const A<T>& y) //成员函数
  f1()
  f2()
};
另外一个类模板B
template<class TT>
class B
{
public:
  TT a;
};
我想问的是:当类模板B作为类模板A的模板参数时,即A<B<T>>,
可不可以只特化A的成员函数f()?
也就是说A<B<T>>调用的f()与其他A<T>调用的f()是不同的,其他函数都相同
我看过相关的知识,成员函数是可以特化的,但是特化后好像就是普通函数了
比如A<int>
而A<B<T>>::f()仍然是个函数模板,可以实例化A<B<int>>啥的
如果可以的话应该怎么写呢?

------解决方案--------------------
偏特化
C/C++ code

template<class T>
class A<B<T> >
{
public:
  A f(const A& x,const A& y)
  {
      //不同的f函数
  }
};

------解决方案--------------------
#include <iostream>
using namespace std;
template<class TT>
class B
{
public:
TT a;
};
template<class T>
class A
{
public:
A<T> f(const A<T>* x, const A<T>* y); //成员函数

void fun(T *)
{

}

};
template<class T>
A<T> A<T>::f(const A<T>* x, const A<T>* y) //成员函数
{
cout << "a\n";
}
template<class T>
class A<B<T>>
{
public:
A<B<T>> f(const A<B<T> >* x, const A<B<T> >* y) ;//成员函数

};
template<class T>
A<B<T >> A<B<T> >::f(const A<B<T> >* x, const A<B<T> >* y) //成员函数
{
cout << "c";
}


int main()
{
A<int> a;
a.f(0, 0);
A<B<int> >b;
b.f(0, 0);
return 0;
}
------解决方案--------------------
template<>
 A<B<T>> f(const A<B<T>>& x,const A<B<T>>& y) ;即可