C++类模板中的友元声明及模板构造函数
类模板的友元声明:当授予给定模板的所有实例的访问权的时候,在作用域中不需要存在该类模板或函数模板的声明。想要限制对特定实例化的友元关系时,必须在可以用于友元声明之前声明类或函数。template <class T>class test{ template <class U> friend ostream& operator<< (ostream &os, const test<U> &...