Boost logo

Boost :

From: Doug Gregor (gregod_at_[hidden])
Date: 2001-03-26 15:11:36


On Monday 26 March 2001 12:06, you wrote:
> Potential solution to the problems with option 2).
>
> From operator[](range), return an indexer proxy that collects a list of
> ranges via operator[]. The operator[] for the last dimension returns a
> real subarray. If you don't want to specify all the dimensions,
> use the all() shortcut to cover the rest. For examp,e
>
> Suppose A is 2 dimensional
>
> A[3<=stride(1)<10][0<=stride(1)<5] // returns a subarray
> A[3<=stride(1)<10] // a compiler error, unless followed by more []'s
> A[3<=stride(1)<10].all() // same as A[3<=stride(1)<10][all]

Good solution. Perhaps it would be more visually appealing to cover the rest
of the unspecified dimensions with:

A[3 <= stride(1) < 10][subarray]

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk