OONumerics User : |
From: Luis Miguel De La Cruz Salas (lmd_at_[hidden])
Date: 2001-09-06 12:50:58
Hi,
someone knows if the Barton & Nackman Trick works fine in SGI MIPS
Pro compiler?.
I'm tryin to compile the next code:
---------------------------------------------------------------------
template<class T_mesh>
class Mesh {
public:
Mesh() {
Dimension = asLeaf().getDimension();
cout << " Mesh: Dimension = " << Dimension << endl; }
~Mesh() {}
T_mesh& asLeaf() { return static_cast<T_mesh&>(*this); }
protected:
int Dimension;
};
template<class T_number, int Dim>
class StructuredMesh : public Mesh<StructuredMesh> {
public:
StructuredMesh() {
Dimension = Dim;
cout << " StructuredMesh: Dimension = " << Dimension << endl; }
~StructuredMesh() {};
int getDimension() { return Dim; }
};
// in main.cc
...
StructuredMesh <double, 3> grid;
...
---------------------------------------------------------------------
This is the error I get:
cc-1420 CC: ERROR File = ./../include/StructuredMesh.h, Line = 38
An argument list for class template "StructuredMesh" is missing.
class StructuredMesh : public Mesh<StructuredMesh>
^
cc-1420 CC: ERROR File = ./../include/StructuredMesh.h, Line = 38
An argument list for class template "StructuredMesh" is missing.
class StructuredMesh : public Mesh<StructuredMesh>
^
detected during instantiation of class "StructuredMesh<double,
3>"
at line 32 of "./prueba.cpp"
2 errors detected in the compilation of "./prueba.cpp".
make: *** [prueba.o] Error 2
Thanks in advance,
Luis M. de la Cruz
--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list_at_[hidden]