std::priority_queue, std::vector >, greater*>>
heap;
这句话编译不通过
[Error] template argument 3 is invalid
我在前面定义了greater
template
struct greater
{
bool operator()(const T &left, const T &right)
{
return left->_weight > right->_weight;
}
};
为什么编译不通过?