import std.stdio;
class Name
{
string s;
this(string s)
{
this.s = s;
}
}
void main()
{
Name n1 = new Name("John");
Name n2 = new Name("John");
int[Name] ages;
ages[n1] = 50;
assert(ages[n2] == 50);
}
