Due to compatibility with some C code, I basically need to do this:

    struct Wrapper
    {
        int[] x;
    }

    void main()
    {
        void* ctxptr = new Wrapper([1, 2, 3]);
        auto context = cast(Wrapper*) ctxptr;
        writeln(context.x);
    }

How can I do that without the wrapper? `new int[]` isn't supported, even though that's exactly what I want.

Reply via email to