Boost logo

Boost :

From: John (EBo) David (ebo_at_[hidden])
Date: 2001-05-25 21:08:59


From: "joel de guzman":
>
> From: "Douglas Gregor":
> >
> The bracket notation unfortunately can't be used for everything, because
> > digit[0, 2] == digit[2]
> >
>
> [] can't have 2 parameters. Is that what you mean?
>
> can't have:
>
> struct X {
> int operator [] (int, int);
> };
>
> So we're left with the () op.
>
> ... Right....
>
> Seigh, I kinda liked [] for iteration to distinguish from
> grouping ex:
>
> (a | b | c)[0, more];
>
> instead of
>
> (a | b | c)(0, more);

haven't though much about it, but how about "digit[0][2]" or
"(a|b|c)[0][more]" instead...
couldn't that work?

  EBo --


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