Why is this fails to compile:
template<typename T, int N>
using vec = vector<vec<T, N - 1>>;
template<typename T>
using vec<0> = T;
while just nesting it into a struct works just fine:
template<typename T, int N>
struct foo {
using vec = vector<typename foo<T, N - 1>::vec>;
};
template<typename T>
struct foo<T, 0> {
using vec = T;
};
What is the rationale for forbidding recursion in aliases if you can just replace it with more verbose construct?