From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-05-27 00:40:38
On Saturday 26 May 2001 10:58 pm, you wrote:
> PS> But what if we disallow the third level ?
> e is a paradox even with the other iterator
> styles: e(0) or e.repeat(0). Should it match
> anything or nothing? Matching anything is
> the universal string U. The simplest way out
> thatI could think of is to disallow it.
One would expect e(0) to match nothing because, presumable, e(1) == e,
e(2) = e >> e, etc. That's what I would expect from the single-argument forms.
This goes back to the exact problem that came up with the multidimensional
array library. The following is ambiguous:
It could equal e | e | e or it could equal e.
Now you know why I support using the () syntax or a repeat function instead
I mentioned it back in the multidim library discussions, so I'll mention it
here. If we wanted a large degree of flexibility (as was needed for array
slicing), we could support syntax like:
e[0 <= stride(2) <= 8]
which is equivalent to:
e | e | e | e | e
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk