Must support comparison for equality and the hash function. Default built-ins provided appropriately.
In theory you could use a tree for unhashable things with a total order, and you could use a list for just about anything else (though you might want to emit a warning...).
I assume D has enough magic to pattern match on the traits of the types in the argument list?
Presuming you have equality.
Oh, that's tragic.
s/tr/m/
Very magical—but I'm not convinced all types have meaningful equality or hashes. It's convenient to have, but thorny whenever you, say, have anonymous functions lying around.
Those won't compile.
Oh, dlthomas caught what went wrong! I misunderstood, apologies. If they dont compile then that's great.
Why is it tragic?
My read of this is that tel (mis)interpreted andralex as saying that all types must support equality and hashing, not that types must support equality and hashing to be hashable. It would be tragic because there can be types with no meaningful way to produce a hash or test for equality.
If that's not the case, then I don't understand either.