new Queue<>, test OK!

This commit is contained in:
2023-08-09 16:51:51 +08:00
parent d1e2fd03a1
commit fda1a60df7
4 changed files with 82 additions and 43 deletions

View File

@@ -23,12 +23,12 @@ template<typename T> class Comparator
public:
/**
* 比较函数,需被特例化或派生实现
* 比较函数,需被特例化或派生实现. 正确情况下此函数不应该会被调用
*/
virtual int compare(const T &a,const T &b)const
{
return 0; // 如 return(a-b); ,但这个函数正确情况下不应该会被调用
}
virtual int compare(const T &a,const T &b)const;
//{
// return 0; // 如 return(a-b);
//}
/**
* 交换函数