Odd behavior of darray.dup

Bastiaan Veelo Bastiaan at Veelo.net
Sat Feb 23 19:21:10 UTC 2019


On Friday, 22 February 2019 at 11:36:35 UTC, solidstate1991 wrote:
> If I want to copy an array of structs with .dup (cannot post 
> the link in question here at the moment due to non-working 
> clipboard, it's Color from pixelperfectengine.graphics.common) 
> I get all zeroes instead of the values from the original array. 
> I haven't disabled post-blit to my knowledge.
>
> Is it some kind of a bug, or the .dup function has some 
> behavior that's not currently documented on the site (such as 
> needing a copy constructor)?

It works for me:
https://run.dlang.io/gist/473b0021487275751accaebeb00be05c

-- Bastiaan


More information about the Digitalmars-d-learn mailing list