Operator Overloading for Enum

Paul Backus snarwin at gmail.com
Mon Feb 8 15:57:01 UTC 2021


On Monday, 8 February 2021 at 15:56:24 UTC, Michael Brown wrote:
> Hi all,
>
> Is it possible to operator overload on enums? I'd like to do a 
> opCmp()
>
> Kind regards,
> Mike

No, it isn't. Only structs and classes can have overloaded 
operators.


More information about the Digitalmars-d-learn mailing list