Variant and immutable struct

Øivind via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 21 19:03:07 PDT 2016


On Sunday, 10 January 2016 at 17:50:44 UTC, Vlad Leberstein wrote:
>
> As I'm not very good at D, I would like to get some feedback 
> about this solutions' viability. AFAIU memcpy-ing struct here 
> is safe because all target arguments ever passed to tryPutting 
> are internal to implementation(and SHOULD be void-initialized 
> but it's currently not working AFAIK). Maybe postblit should 
> also be called for new instance, but I'm not sure about current 
> state of qualified postblit.
>
> Any help would be greatly appreciated!

I am hitting the same problem. Trying to send an immutable 
hashmap of variants with std.concurrency.


More information about the Digitalmars-d-learn mailing list