offTi not working... workaround for bug 1348? Tuples perhaps?
Chad J
gamerChad at _spamIsBad_gmail.com
Tue Aug 14 20:44:37 PDT 2007
Robert Fraser wrote:
> Chad J Wrote:
>
>> Node[] children = new Node[0];
>> foreach( member; this.tupleof )
>> {
>> static if ( is( Node : typeof(member) )
>> {
>> children ~= member;
>> }
>> }
>>
>
> if(cast(Node) member) ...? Haven't tested it, but it might work.
Ah, I probably should've mentioned that the "children ~= member;" line
is where the problem occurs. The static if works fine. It is appending
something to children when it should be, but that something is always
null :(
More information about the Digitalmars-d-learn
mailing list