Artifact 0665970b47ba63edb1f62d28f3763fb1126d2c1b
public import std.algorithm;
public import std.array;
public import std.conv;
public import std.range;
public import std.stdio;
public import std.string;
public import std.typecons;
import std.c.stdlib;
void application_exit()
{
std.c.stdlib.exit(0);
}
template DeriveCreate()
{
this(TS...)(TS params)
{
this.tupleof = params;
}
}
template DeriveCompare()
{
override:
bool opEquals(Object rhs) const
{
return tuple(this.tupleof) == tuple((cast(typeof(this))rhs).tupleof);
}
int opCmp(Object rhs) const
{
return tuple(this.tupleof).opCmp(tuple((cast(typeof(this))rhs).tupleof));
}
hash_t toHash() const
{
hash_t v = 0;
foreach(mem; this.tupleof) {
v *= 11;
static if(__traits(compiles, v^=mem))
v ^= mem;
else
v ^= typeid(mem).getHash(&mem);
}
return v;
}
}
template DeriveShow()
{
override:
string toString() const
{
string str = text(typeof(this).stringof, "(");
foreach(i,mem; this.tupleof) {
if(i) str ~= ", ";
str = text(str, this.tupleof[i].stringof[5..$], ":", mem);
}
return str ~ ")";
}
}