Subject: Enumerated types in C++
From: David W. Smith (david.smith@synopsys.com)
Date: Mon Aug 19 2002 - 14:05:43 PDT
There was a question about the meaning of increment and decrement
operators in C++.
It turns out that C++ does not provide definitions of increment and
decrement operators for enumerated types. Enumerated types are a class
of user-defined type for which the user may define these operators. It
relies on the ability to cast from ints to enumerated types etc... This
is different than C where enumerated types are just integers.
So, it is not possible to define enumerated types to be consistent with
both C and C++. One or the other must be picked.
David
David W. Smith
Synopsys Scientist
Synopsys, Inc.
Synopsys Technology Park
2025 NW Cornelius Pass Road
Hillsboro, OR 97124
Voice: 503.547.6467
Main: 503.547.6000
FAX: 503.547.6906
Email: david.smith@synopsys.com
<http://www.synopsys.com/> http://www.synopsys.com
This archive was generated by hypermail 2b28 : Mon Aug 19 2002 - 14:08:03 PDT