Cameleon: Stricter Alternative Implementation of VariantN
Kagamin via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Sep 22 02:57:56 PDT 2015
On Monday, 21 September 2015 at 13:42:14 UTC, Nordlöw wrote:
> Questions:
>
> - Is the logic of opAssign and get ok for string?
> - How does the inner workings of the GC harmonize with my calls
> to `memcpy` in `opAssign()` here
>
> https://github.com/nordlow/justd/blob/master/cameleon.d#L80
That line won't compile, so don't be afraid of its behavior.
> - Do I have to call some GC-logic in order to make the GC aware
> of the new string-reference in `opAssign`?
Make sure your struct is always sizeof(void*)-aligned.
More information about the Digitalmars-d-learn
mailing list