我正在尝试编译 Nurbs++ 库的部分内容,并遇到如下错误。为什么?
nurbs_pp/matrix/source/vector.cpp:49:20: error: ‘Vector’ is not a template
nurbs_pp/matrix/source/vector.cpp:49:37: error: expected initializer before ‘<’ token
在vector.h中:
namespace PLib {
template <class T> class Vector ;
template<class T> class Vector : public BasicArray<T>
{
public:
int rows() const //!< a reference to the size of the vector
{ return this->sze ;}
Vector() : BasicArray<T>(1) {} //!< Basic constructor
Vector(const int r) : BasicArray<T>(r) {}
Vector(const Vector<T>& v) : BasicArray<T>(v) {}
Vector(const BasicArray<T>& v) : BasicArray<T>(v) {}
Vector(T* ap, const int size) : BasicArray<T>(ap,size) {}
Vector(BasicList<T>& list) : BasicArray<T>(list) {}
virtual ~Vector() {}
Vector<T>& operator=(const Vector<T>& v);
Vector<T>& operator=(const BasicArray<T>& b);
在vector.cpp中:
namespace PLib {
template <class T> Vector<T>& Vector<T>::operator=(const Vector<T> &b)