16,816
社区成员




QList<QextPortInfo> newPortInfo;
QList<QextPortInfo> currPortInfo;
if(newPortInfo==currPortInfo){}
在执行上述代码时,出现了template <typename T>
Q_OUTOFLINE_TEMPLATE bool QList<T>::operator==(const QList<T> &l) const
{
if (p.size() != l.p.size())
return false;
if (d == l.d)
return true;
Node *i = reinterpret_cast<Node *>(p.end());
Node *b = reinterpret_cast<Node *>(p.begin());
Node *li = reinterpret_cast<Node *>(l.p.end());
while (i != b) {
--i; --li;
if (!(i->t() == li->t()))
return false;
}
return true;
}
这是QList.h里面的==的定义,请问只有一个参数怎么来进行比较?