Copy a struct on the heap and get the pointer to it.

Timon Gehr timon.gehr at gmx.ch
Sat Nov 12 07:23:15 PST 2011


On 11/12/2011 04:17 PM, Adam D. Ruppe wrote:
> The way I'd do it is:
>
> S s;
>
> auto heap = new S;
>
> *heap = s;
>
>
> that should work.

struct S{
     immutable no_it_does_not = 0; // ;)
}


More information about the Digitalmars-d mailing list