As an aside, I've put a bit of work into the generic multidimensional containers problem lately and have an interface generating library as a result.

https://github.com/evenex/autodata

It's still in the nascent stages but contains a lot of tools for working with multidimensional structures.

You can take a look at the definition in the spaces/ and topology/ folder (and the unittests in operators/) to get an idea of how it works - basically generates all the opIndex/opSlice stuff (with safety checks) under a unified system; end result being that you just write the business logic for your types, mixin the operators, and they will all interoperate with uniform semantics.

The definitions for the types themselves tend to be very short and to-the-point as a result. I've taken old containers of mine whose defs were pushing 300 lines and reimplemented them in ~50 using the autodata operators.

A full set of traits and multidim range compositions (map, zip, take, cycle, repeat) are present as well. A lot of them are full or partial reimplementations of Phobos stuff.

It's pretty poorly documented (for now) but I'm happy to answer questions (and make documentation based on that) if you decide to check it out.

Reply via email to