J
jim
Hi,
I want to do something like this:
foo.h:
class FooData;
typedef MyTemplate<FooData> MyFoo;
class Foo2: public MyFoo {
// ...
};
foo.cpp:
class FooData {
// ...
};
Assume that MyTemplate only uses pointers to its template parameter and
never calls any methods on it (just passes pointers to it to other
routines/classes). I seem to remember reading that this won't work,
because you always have to define (not just declare) a class before you
use it as a template parameter. Is this right?
Cheers,
Jim
I want to do something like this:
foo.h:
class FooData;
typedef MyTemplate<FooData> MyFoo;
class Foo2: public MyFoo {
// ...
};
foo.cpp:
class FooData {
// ...
};
Assume that MyTemplate only uses pointers to its template parameter and
never calls any methods on it (just passes pointers to it to other
routines/classes). I seem to remember reading that this won't work,
because you always have to define (not just declare) a class before you
use it as a template parameter. Is this right?
Cheers,
Jim