Compare type with another at CT
Frustrated
c1514843 at drdrb.com
Thu Jan 23 08:40:49 PST 2014
Yes, I that is what I tried initially but the error was due to
that static if.
Not sure why
but
static if (is(T : A))
{
...
}
static assert(0, "error");
doesn't work as the assert is called no matter what. Initially I
forgot to return the value after changing the code but that
doesn't matter.
Had to change it to
static if (is(T : A))
{
...
return ...;
} else
static assert(0, "error");
return null;
I guess because return is not "static" in some sense.
More information about the Digitalmars-d-learn
mailing list