title: Iterating over the dimensions of a boost::multi_array
body: <p>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).</p>
  
  <p>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.</p>
  
  <p>What I can't figure out how to do is iterate the selected dimension over all of the dimensions of the array, when the dimension of the array is known at compile time.</p>
  
  <p>Any advice on how to do this?</p>