Boost logo

Boost :

From: Vassilii Khachaturov (vassilii_at_[hidden])
Date: 2005-01-19 01:18:52


> > arr a(boost::extents[ arr::extent_range(1, 1) ]);
>
> I'm not a multi.array user, but this is an invalid range. See
> Table 4 [1] Invariants:
> o Valid range [a.begin(),a.end()) is a valid range.

Thanks. It looks like I have misunderstood the extent_range ctor semantics.
Upon re-reading the multi_array reference page in its extent_range section,
I see

extent_range(index start, index finish)

    This constructor defines the half open interval [start,finish). The
expression finish must be greater than start.

(I assumed that finish is included in the interval, hence the snippet.)

Vassilii


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