This is what I'm trying to do:
template<typename T, int I>
class A {
public:
using CA = T::C<I>;
};
class B {
public:
template<int I>
struct C {};
};
int main()
{
A<B, 1> a;
return 0;
};
However, inexplicably (to me), this comes up as a syntax error - "missing ';' before '<' at the "using UA =" line. Have tried quite a few variations but can't figure out what's missing. Thanks
Corrected syntax:
using UA = T::template U;
Looks like this was actually answered previously in great detail at Where and why do I have to put the "template" and "typename" keywords?
Thanks all.