Is it possible to use a type Y which has been defined by a typedef inside of another type X, from within a third templated type Z, where X acts as a template parameter to Z?
This (non-compiling) pseudocode illustrates the desired behaviour:
struct X {
typedef float Y;
};
template<typename T>
struct Z {
void DoSomething(T::Y with_this);
};
Yes, it’s possible. You just need to let the compiler know that
T::Yis a type because it depends onT: