Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-10 20:04:27


"Rob Stewart" <stewart_at_[hidden]> wrote in message
> From: "Jonathan Turkanis" <technews_at_[hidden]>
> > "Rob Stewart" <stewart_at_[hidden]> wrote in message:
> > > From: "Jonathan Turkanis" <technews_at_[hidden]>

> > > Yours/John's Mine
> > > enum
> > > {
> > > name_a = 1, 1<<0,
> > > name_b = name_a << 1, 1<<1,
> > > name_c = name_b << 1 1<<2
> > > };
> > >
> > > Now add name_x after name_b:
> > >
> > > enum
> > > {
> > > name_a = 1, 1<<0,
> > > name_b = name_a << 1, 1<<1,
> > > name_x = name_b << 1, 1<<2,
> > > name_c = name_x << 1 1<<3
> > > };
> > >
> > > Your version requires a more extensive change
> >
> > True -- if there are only three enumerators!
>
> How does the number of enumerators matter?

With my method, when you stick an enumerator into the middle, you only have to
adjust the definitions of the adjacent enumerators. With your method, it looks
to me like you have to renumber all the enumerators which follow the insertion
point.

Best Regards,
Jonathan


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