On 01/25/2014 01:57 PM, Dominikus Dittes Scherkl wrote:
...
Walter wrote:
"There's no NaN for integrals."
At least the carry-bit is already available in hardware. So the save
type doesn't incure much performance loss in operations. On the other
hand comparison, assignment and casts become slower by a factor 2 or 3.
And then comparison cannot be implemented fully correct with the current
operator overloding system of D.
Why not?
struct S{
auto opCmp(S r){ return float.nan; }
}
void main(){
S s;
assert(s!<>=s);
}