Auto recursive function

Stefan Koch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 11 11:30:05 PST 2017


On Wednesday, 11 January 2017 at 19:23:10 UTC, Razvan Nitu wrote:
> Hi,
>
> I am currently trying to create a function 
> makeMultidimensionalArray which allocates memory for a 
> multidimensional array. It is very similar with [1],
> the difference being that it is uninitialized. Here is the code:
>
> [...]

I believe you should not do this with recursion.
Because that'll instantiate the template multiple times with 
different types.
What is wrong with using ndslice here ?



More information about the Digitalmars-d-learn mailing list