opEquals when your type occurs on the right hand side of an equality test
NonNull
non-null at use.startmail.com
Wed Jul 31 20:03:47 UTC 2019
I am creating a specialized bit pattern (secretly represented as
a uint) as a struct S, but want to avoid `alias this` to maintain
encapsulation excepting where I overtly say. Specifically, I want
to avoid making arithmetic and inequalities available for S.
I have written opEquals to compare an S to a uint.
How do I write code to compare a uint to an S?
More information about the Digitalmars-d-learn
mailing list