'function': 函数模板不能是局部类的
friend
本地类不能将函数模板用作 friend
函数。
以下示例生成 C2701:
// C2701.cpp
// compile with: /c
template<typename T> // OK
void f1(const T &);
void MyFunction() {
class MyClass {
template<typename T> friend void f2(const T &); // C2701
};
}