N
Nico Kruithof
Hello,
I have the following problem. Assume I have a templated class (B) that
is parameterized by a pointer to another class (A), how can I obtain
information of the types of A within B?
This small program might help:
class A {
public:
typedef int myInt;
};
template <class Ap>
class B {
public:
typedef Ap::myInt myInt; // ???????????
};
int main() {
B<A*> b;
}
Thanks in advance,
Nico
I have the following problem. Assume I have a templated class (B) that
is parameterized by a pointer to another class (A), how can I obtain
information of the types of A within B?
This small program might help:
class A {
public:
typedef int myInt;
};
template <class Ap>
class B {
public:
typedef Ap::myInt myInt; // ???????????
};
int main() {
B<A*> b;
}
Thanks in advance,
Nico