[C++-sig] Re: Re: Re: enum_ exporting implemented

Mike Rovner mike at bindkey.com
Sat Dec 14 01:58:34 CET 2002


"David Abrahams" <dave at boost-consulting.com> wrote in message
news:u4r9hmozd.fsf at boost-consulting.com...
> "Mike Rovner" <mike at bindkey.com> writes:
>
> >> >>>> identity(color(3))
> >> > enums.color(3)
> >> >
> >> > a mistake? There is no 3 in example enum.
> >
> > I mean not how it is working, but how it shall work.
> > If it's a legitimate behavior, please, explain why.
>
> It mirrors the behavior of C++ enums.

Shall we follow all bad design? ;)

> Why do you think it's illegitimate?

Because there is no 3 in original enum.

> What do you think enums.color.red + enums.color.green should do?

Return integer 3.
(Like in Python: False + True is just 1 and only for backward compatibility
imho)

----
All that is IMHO without pretending to know better. I just think it's
unclear point.









More information about the Cplusplus-sig mailing list