www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Inner templates?

I'd like to do something like this:

int f() {
enum E { e1 }
template X( E e : e.e1 ) { alias int vint; }
}

but i get the error: 

test.d(3): found 'template' instead of statement
test.d(4): unrecognized declaration

Pulling everything out of function scope makes it all work.
Jun 23 2004