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

Johannes Loher via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 5 05:34:20 PDT 2016


Am 05.07.2016 um 00:41 schrieb Rene Zwanenburg:
> 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

I tried this, but it does not work correctly with slices.


More information about the Digitalmars-d-learn mailing list