Comment #0 by n8sh.secondary — 2018-09-05T18:09:49Z
Nullable(T, T nullValue) special-cases floating point numbers but this doesn't account for all types where nullValue != nullValue. For instance:
https://run.dlang.io/is/hiLncI
---
struct S
{
float f;
}
void main()
{
import std.typecons : Nullable;
alias N = Nullable!(S, S.init);
assert(N(S.init).isNull); // Fails!
}
---
Comment #1 by n8sh.secondary — 2018-09-05T18:18:39Z