I have a class and a nested class in C++ and they are both generic classes.
#define GENERIC template<typename T>
GENERIC
class Class1 final{
private:
GENERIC
class Class2 final{
private:
T class2Field{};
};
T class1Field{};
};
I want to pass the type parameter T
that is passed to Class1
when instantiating it, all the way to the Class 2
. How can I achieve that?