https://issues.dlang.org/show_bug.cgi?id=19631
--- Comment #3 from Arne Marschall <[email protected]> --- (In reply to Basile-z from comment #2) > Problem happens when the initializer type is being determined. > In case of this issue is blocking some work there are two possible > workarounds in addition to the "non nesting" solution. > > 1. Field!(w, h) a = *new Field!(w, h); > 2. bool[_h][_w] s = void; Actually this is not a blocker, I am only training myself. So I ported this "Game of Life" example and experimented with different arrays. The templated version crashed it. This would work as well Field!(w, h) a; But the complete code uses two instances of Field, a & b and swaps them a lot. Swapping of a and b is done much faster if they are pointers instead of 100x100 arrays. This version compiles as well and takes advantage of the internal pointers within dynamic arrays. auto ab = [Field!(w, h).init, Field!(w, h).init]; instead of a and b it uses ab[0] and ab ab[1]. And swaps them here. import std.algorithm.mutation : swap; swap(ab[0], ab[1]); --
