Initializing static array with contents of (static and dynamic) arrays

Rene Zwanenburg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 4 15:41:34 PDT 2016


On Monday, 4 July 2016 at 19:22:52 UTC, Johannes Loher wrote:
> This looks really nice, but I have several occurences of this, 
> with different arrays (and lengths), so i would need to create 
> several of those structs. But it looks really clean :)

You can use a template to remove the boilerplate. Here's a quick 
example:

https://dpaste.dzfl.pl/43b379992648


More information about the Digitalmars-d-learn mailing list