M
mlt
I have some code that looks like this:
template<typename math>
class FirstClass {
public:
typedef math math_types;
typedef FirstClass<math_types> types;
...
typedef SecondClass<types> second_type;
...
}
How can a class typedef itself (FirstClass) and be used as a template
parameter for another type (SecondClass)? Don't I need to define
FirstClass before I can use it as a type parameter for SecondClass?
template<typename math>
class FirstClass {
public:
typedef math math_types;
typedef FirstClass<math_types> types;
...
typedef SecondClass<types> second_type;
...
}
How can a class typedef itself (FirstClass) and be used as a template
parameter for another type (SecondClass)? Don't I need to define
FirstClass before I can use it as a type parameter for SecondClass?