I\'m trying to use a typedef from a subclass in my project, I\'ve isolated my problem in the example below.
Does anyone know where I\'m going wrong?
Not exactly what you were asking, but you can make action a template member function:
template
class A {
public:
//Why doesn't it like this?
template void action(V var) {
(static_cast(this))->do_action();
}
};
class B : public A {
public:
typedef int mytype;
B() {}
void do_action(mytype var) {
// Do stuff
}
};
int main(int argc, char** argv) {
B myInstance;
return 0;
}