macro for enum operations

Michael Matz matz at kde.org
Thu Sep 11 17:03:57 BST 2003


Hi,

On Thu, 11 Sep 2003, Lubos Lunak wrote:

>  Then the bitmask would fix it. Or even simpler, the macro could require
> that the enum has one entry with value 1 << 31 (or 1<<63, if the macro
> would use unsigned long long). That would also avoid the problem with
> extending the enum later.

In that case it's total nonsense to define your own operators.  The unary
and binary arithmetic operators are also defined on enumeration types.
What do we gain with defining our own anyway?


Ciao,
Michael.





More information about the kde-core-devel mailing list