[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: macro for enum operations
From: Guillaume Laurent <glaurent () telegraph-road ! org>
Date: 2003-09-10 20:33:29
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic