struct CompareT : public std::binary_function<T,T,bool>
{
bool operator()(const T& t_1, const T& t_2) const
{
return t_2 < t_1;
}
};
改为:
struct CompareT
{
typedef T first_argument_type;
typedef T second_argument_type;
typedef bool result_type;
bool operator()(const T& t_1, const T& t_2) const
{
return t_2 < t_1;
}
};
我也不知道报错的原因到底是什么,猜测应该是编译器的原因,修改完就可以了。