I've written a library at GitHub/rahogaboom/daa that does dynamic array allocation in ptr to ptr ... style that is very simple to use(only two routines), header file only, can allocate an unlimited number of dimensions with subscripts for each dimension starting at an arbitrary number e.g. 0, 1, -5 etc, can allocate anything you can take sizeof() and allocates all in one contiguous block(stack, heap) for easy freeing. I'm aware of the Boost.MultiArray library, however, I think daa has some advantages. Specifically, a. each dimension has it's own starting subscript b. it's relative simplicity(2 routines) c. it's longevity - 30 years and two articles d. also can be used in a C only environment. Following is the points noted in the GitHub README.md: I've been using my own multi-dimensional array class for years now, and my biggest regret is that I added support for subscripts starting at an arbitrary number. This means that even though 99% of my array dimensions start at 0, every function that takes a multi-dimensional array as argument is now complicated by having to be aware of the
On 23.10.19 22:20, Richard Hogaboom via Boost wrote: possibility of a dimension starting at a different number. That's a lot of additional complexity for minimal benefit. -- Rainer Deyke (rainerd@eldwood.com)