Bug 4233 – Eponymous template template members inaccessible
Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-05-25T09:23:00Z
Last change time
2014-02-15T02:45:13Z
Assigned to
nobody
Creator
simen.kjaras
Comments
Comment #0 by simen.kjaras — 2010-05-25T09:23:24Z
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.
Comment #1 by clugdbug — 2010-05-25T13:33:59Z
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 ***