macro for enum operations
Guillaume Laurent
glaurent at telegraph-road.org
Wed Sep 10 21:33:29 BST 2003
On Wednesday 10 September 2003 22:20, Ravikiran Rajagopal wrote:
> On Wednesday 10 September 2003 08:04 am, Guillaume Laurent wrote:
> >
> > Actually an enum can have any value which can be represented by the
> > number of bits of its largest defined value. So the boolean operators are
> > perfectly legal.
>
> In C++, enums have sizes that are not necessarily the same as those of ints
> of any form.
Yes.
> If I understand the standard right (correct me if I am wrong),
> the size can actually be larger than that of longs.
I'm not sure of that, and I somewhat doubt it because that would have most
impractical consequences.
> Please see Dirk's recent commits regarding implicit conversion of enums to
> ints and the problems with gcc 3.4.
If I recall correctly, the problem was because enums where *shorter* than
ints.
--
Guillaume.
http://www.telegraph-road.org
More information about the kde-core-devel
mailing list