----- Original Message -----
From: "David Abrahams" <[EMAIL PROTECTED]>


> "Paul Mensonides" <[EMAIL PROTECTED]> writes:
>
> >> > Well, yes.  If you do that, however, it removes one of the primary
> > reasons
> >> > to use enumerations, which is for the syntactic convenience.  The
only
> >> > reason left to use enums is to avoid the static storage of the
> >> > values.
> >>
> >> And to improve compilation and linking speed.
>
> I haven't done the tests of course, but I'd expect it to be faster
> anyway.  Allocating space in the link map for the static constant and
> resolving it across translation units has to cost something.

I guess it would depend heavily on the compiler used.  For instance, a
compiler might not actually create the storage at all unless the address of
the static const is actually needed--which would cause the effect to be
minimal.  On the other hand, unless you mapped all the enumerators of a
particular value to the same type, you'd have issues with name lookup.

Paul Mensonides

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to