template makeConvMatrix(T...) {
string helper()
{
string result;
static foreach(t; T)
{
result ~= "\t" ~ t.stringof;
}
result ~= "\n";
static foreach(t1; T)
{
result ~= t1.stringof;
static foreach(t2; T)
{
result ~= "\t" ~ (is(t1:t2) ? "yes" : "no");
}
result ~= "\n";
}
return result;
}
enum makeConvMatrix = helper();
}
extern(C)
void main()
{
import core.stdc.stdio;
static immutable convMatrix = makeConvMatrix!(byte, ubyte, short, ushort, int, uint, long, ulong);
printf("%s\n", convMatrix.ptr);
}