-2
我做了這個類,但它不能在編譯此錯誤:模板函數++要返回另一個容器
expected primary-expression at end of input
爲什麼?
class ContextClass : public QObject
{
Q_OBJECT
public:
ContextClass(UnitOfWork u, QObject *parent = 0);
template <class T> QList<T> table(const QString& filter = QString)
{
return QList<T>();
}
};
問題即QString默認值必須是即QString()對不起 –