I don't think that is acceptable, as you will change the behavior of
Nullable!T, if "t = null" already meant something. EG:
//----
import std.typecons;
void main()
{
auto n = Nullable!(int*)(null);
assert(!n.isNull);
assert(n.get() == null);
}
//----
Arguably, you won't see that very often, but it is plausible for someone to
want to be able to have a nullable pointer, whose "non-null" value can itself
be null.
As a workaround, Nullable-specific "null-token" could work? EG: something along
the lines of:
EG:
enum Nullable {Null}
void foo(Nullable!(immutable int[4]) items = Nullable.Null)
{}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------