The typedef
declaration in C++ cannot be a template. However, C++11 added an alternative syntax using the using
declaration to allow parametrized type aliases:
template <typename T>
using Bar = typename Foo<T>::Bar;
Now you can use:
Bar<int> x; // is a Foo<int>::Bar