Assigning to array of structs with custom constructor

cc cc at nevernet.com
Mon Apr 25 21:34:51 UTC 2022


On Monday, 25 April 2022 at 15:23:12 UTC, Ali Çehreli wrote:
>   auto arr = iota(10).map!(i => Foo(i.text)).array;

On Monday, 25 April 2022 at 16:11:47 UTC, rassoc wrote:
>     Foo[] arr = ["abc", "def", "ghi"].map!Foo.array;

Ahh that'll do it alright, thanks


More information about the Digitalmars-d-learn mailing list