Iterating over the dimensions of a boost::multi_array
问题 I'm trying to write some dimension-independent code for a template class in c++, using a boost::multi_array (though if other containers/data structures are better at this, I'd be happy to hear about it). Given a dimension, I would like to iterate over the full range of every other dimension, returning a 1d view along the selected dimension. This is fairly straightforward, or at least it appears to be from the boost documentation. What I can't figure out how to do is iterate the selected