Boost logo

Boost Users :

From: Levent (sly5+gmane_at_[hidden])
Date: 2006-05-07 09:43:11


Levent wrote:
> Is it possible to store tuples of index or range values (or generators)
> for later reuse? Consider the following:
>
> typedef boost::multi_array<int,3> Arr;
> typedef Arr::index_range Ir;
> typedef ??? indices;
> Arr a(boost::extents[3][4][5]);
> Arr b(a);
> indices somerange = Arr::index_gen[Ir()][Ir(1,5)][Ir()<2];
> b[somerange] = a[somerange];
> // and so on
>
> What should `???' be?
>
> thanks
> - Levent

it seems one answer is
typedef boost::detail::multi_array::index_gen<3,3> indices;

but is there anything as a part of the user interface?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net