template foo( T ) { template foo( U ) { enum foo = is( U == T ); } } static assert( foo!( int )!( int ) ); The above code does not compile, complaining that the ! should not be there. Ok, so I use a FQN: static assert( foo!( int ).foo!( int ) ); Error: undefined identifier template foo(U).foo So apparently, there is no way to get access to the inner foo.
This is yet another duplicate of the oldest open DMD enhancement in Bugzilla. It's probably worth voting for bug 242. *** This issue has been marked as a duplicate of issue 242 ***