question about the implementation of Variant

aki via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 4 21:14:26 PST 2016


Thank you, Jonathan. Now I understand.

On Monday, 4 January 2016 at 17:34:47 UTC, Kapps wrote:
> union
> {
>     ubyte[size] store;
>     // conservatively mark the region as pointers
>     static if (size >= (void*).sizeof)
>         void*[size / (void*).sizeof] p;
> }

Interesting to know the way to make GC detect the presence of the 
potential pointer.

Regards, aki.



More information about the Digitalmars-d-learn mailing list