Auto recursive function

Martin Nowak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 11 11:36:47 PST 2017


On Wednesday, 11 January 2017 at 19:23:10 UTC, Razvan Nitu wrote:
> auto makeMultidimensionalArray(T, Allocator)(auto ref Allocator 
> alloc, size_t[] lengths)
> {
>     if (lengths.length == 1)

Looks like `static if` would fix your specific problem.



More information about the Digitalmars-d-learn mailing list