no size yet for forward reference for nested structures

qqiang via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 13 22:41:09 PST 2015


The following code:
```D
template PowerHeap(T) {
     import std.container : SList;

     private alias PowerForest = SList!PowerNode;

     private final class PowerNode {
         ...
     }

     final class PowerHead {
         ...
     }
}

unittest {
     PowerHeap!int h;
}
```

failed to compile and get the error: PowerHeap!int.PowerNode: no 
size yet for forward reference.

I've googled and found no straightforward solution to this issue. 
The how can I modify my code to eliminate this error?


More information about the Digitalmars-d mailing list