
Boost : 
From: John (EBo) David (ebo_at_[hidden])
Date: 20010526 06:49:56
From: "joel de guzman" <joel_at_[hidden]>
> From: "Larry Evans" :
>
> > "John (EBo) David" wrote:
> >
> > > From: "joel de guzman":
> > > >
> > > > From: "Douglas Gregor":
> > >
> > > haven't though much about it, but how about "digit[0][2]" or
> > > "(abc)[0][more]" instead...
> > > couldn't that work?
> > >
> >
> > I think the problem here is what's the type of digit[0]? If it's
> > like arrays, then digit is rank2, digit[0] is rank1, and digit[0][2]
> > is rank0. On the other hand, if you claim that all are rank 0, then
> > how do you distinguish whether the i in Parser::operator[](int i) is for
> > the min or max repititions of *this?
> >
>
> I certainly can do this in the framework. In my other post:
>
> > How about:
> >
> > a[2]; // exactly 2
> > a[0][2]; // 0..2
> > a[0][more]; // 0...
> > a[1][more]; // 1...
> >
> > This can be done.
Yep... Since I now get the Boost in digest form sometimes my responses
are a little behind the needle of the thread. Sorry for restating
something already mentioned.
> > PS> Do I hear yuck?
>
> Greg Colvin said: Yuck. I rather see a.repeat(0,more) or repeat<0,more>(a).
I agree. I think that reads much more clear to me. The [][] idea is
only useful if you REALLY want to use []'s.
EBo 
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk