template struct Decl { typedef typename Decl::Type Type; }; // case where both types are the same template struct Decl { typedef T Type; }; template <> struct Decl { typedef double Type; };