Comparison operator overloading

Anonymous via Digitalmars-d-learn digitalmars-d-learn at
Mon Dec 7 10:04:56 PST 2015

On Monday, 7 December 2015 at 17:18:20 UTC, Dominikus Dittes 
Scherkl wrote:
> Hmm. But it works just fine! It overloads also the special 
> floatingpoint operators <> !<> !<= and so on.

Those are deprecated:

> And how else could I handle a self-defined type that happens to 
> have a NaN value (like my save-signed intergers do)?

Something like this:

Or maybe this:

Obviously, you'd want to do what makes sense for your type and 
its semantics. That probably doesn't involve using NCEG operators.

More information about the Digitalmars-d-learn mailing list