template <class Type> class Triple{
friend TripleList<Type> operator +<>(const TripleList<Type> &a,const TripleList<Type> &b);
friend int CompareTriple<>(const Triple<Type> &a,const Triple<Type> &b);
};
上述两个友元函数中“**<>**"尖括号是什么意思?从来没见过在重载运算符"+"后面还加"<>"?
函数模板的特化
http://www.cnblogs.com/mydomain/archive/2011/04/11/2012441.html
namespace boost {
template void checked_delete( T* x );
}
class Test {
friend void boost::checked_delete ( Test* x ); // 不好
friend void boost::checked_delete<>( Test* x ); // 好
};
出自http://www.vckbase.com/index.php/wv/316
这里的确是函数模板特化,加<>能被更多的编译器支持,但我 不明白我这里为啥要函数特化。
出自http://www.cnblogs.com/tracylee/archive/2012/12/14/2818820.html
更能帮助大家理解,先谢谢caozhy 大神