Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-11 22:40:31


----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>

> > 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.
>
> My proposal with integral_c would do exactly that.

Yes, and I like it. ;) The only thing I don't like about it is the
potential interplay with the rest of the type system. The mapping to a
single type per value is good, but it doesn't completely solve the problem.
I just think it is better to steer clear of the situation altogether. I
personally only use static const for interface values though and use
enumerations for internal values (with casting if necessary).

Paul Mensonides


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