Re: Overloading float operators

2017-12-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, December 11, 2017 19:28:47 rumbu via Digitalmars-d-learn wrote: > Is there any way to overload specific floating point operators? > https://dlang.org/spec/expression.html#floating-point-comparisons If those haven't been deprecated yet, they almost certainly will be. It was decided that

Re: Overloading float operators

2017-12-11 Thread ag0aep6g via Digitalmars-d-learn
On 12/11/2017 08:28 PM, rumbu wrote: Is there any way to overload specific floating point operators? https://dlang.org/spec/expression.html#floating-point-comparisons Those don't seem to work anymore. At least since 2.073, dmd rejects them and says to use std.math.isNaN instead. Looks like som

Overloading float operators

2017-12-11 Thread rumbu via Digitalmars-d-learn
Is there any way to overload specific floating point operators? https://dlang.org/spec/expression.html#floating-point-comparisons I'm using a decimal data type (a struct) and one of the possible values is NaN, that's why I need these operators. I know also that this also was discussed, but is