You are using the same name for the template & typedef. I'm not sure whether the compiler is confused, but the programmer will be.