xxxxxxxxxx
import std.stdio;
template Nullable(S)
{
import std.traits : isPointer, isDynamicArray;
static if (is(S == class) || is(S == interface)
|| is(S == function) || is(S == delegate)
|| isPointer!S || isDynamicArray!S)
{
alias Nullable = S;
}
else
{
static import std.typecons;
alias Nullable = std.typecons.Nullable!S;
}
}
struct S
{
Nullable!Object s;
}
void main()
{
S s;
writeln(s.s is null);
}