How can a class inherit itself?

Viewed 2061

I don't understand the following code:

template <int _id> class Model;

template <int _id> class Model : public Model<0> { ... };

So, class Model derives from itself it seems. This doesn't compile with EDG or Gcc (error: invalid use of incomplete type ‘class Model<0>’), but Visual Studio accepts it. What compiler is right and for what reason?

2 Answers
Related