On Wednesday, 27 March 2013 at 18:06:46 UTC, Vidar Wahlberg wrote:
I'm impressed and most grateful for the feedback, I've learned
some new things today :)
int i = 5;
auto foo = new int[][](i,i);
Won't this create an array (with 5 elements) of arrays (with 5
elements), also called a "jagged array"? Where memory is not
necessarily continuously allocated and looking up values adds
another layer of indirection?
Unfortunately yes.
However, it's not a hard problem to overcome with a wrapper
struct over a contiguous array.