Why does the following not compile?
template <typename Child> struct Base
{
typename Child::Type t; // Does not compile. "No type named Type in Child"
};
struct Derived : public Base<Derived>
{
typedef int Type;
};
How is that Base
cannot access its Child's Type? I tried the same with a static function instead of a typedef, and that works just fine.
I tried both GCC 4.4.2 and clang 3.0.