On 2018-07-01 20:55:16 +0000, Robert M. Münch said:

I'm a bit puzzled because I think this is pretty straight forward but doesn't work...

struct mystruct {
        myPtr* root;

        opApply(...){
                myPtr*[] childs;
                
                childs ~= root;
                ...
        }
}

foreach(node; mystruct(myRoot)){
        ...
}

It compiles but the line with ~= gives the nice "bing" under Windows and the application hangs...

What doesn't this work?

One more thing, myPtr* is a pointer to a C struct. So I have:

extern(C) {
        struct myPtr;
        alias myPtrRef = myPtr*;
}

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

Reply via email to