offTi not working... workaround for bug 1348? Tuples perhaps?

Robert Fraser fraserofthenight at gmail.com
Tue Aug 14 13:21:18 PDT 2007


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.


More information about the Digitalmars-d-learn mailing list