一般在类的后边定义
template class A{ template friend int B (const A &a);}templateint B(const A &a){ //TODO }
我感觉friend设计非常不友好,尽量不用吧