On Thu, Oct 9, 2008 at 5:23 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG


Robert Jones wrote:
How do I access the index_range of an array_view? ie.,

typedef boost::multi_array<Cell,2 > Grid;
Grid grid( boost::extents[9][9]);
Grid::array_view<2> view = grid[indices[range(), range()]];

for (Grid::index i = view.?????.start(); i != view.?????.finish(); ++i)
{....}

where I'm expecting i to take values 0..8 inclusive.

Your code seems to have gotten a bit mangled.
Can you post a small compilable example?


I would if I could, but getting it to compile is exactly my problem! I
don't understand what I need to write for the "?????" bits.

The reference guide for multi_array describes a start() and finish()
methods on the index_range type, but I can't see how to get a
populated object of type index_range from a multi_array or from
a multi_array_view.

Thanks

- Rob.