This could be solved, I think, with having "TypeInfo.getHash" a template taking the actual type and not void*. That template can then inspect if the passed type is a D class or any other type of class and act accordingly.
It could be simpler (and slower ;)) by using `m_flags & ClassFlags.isCPPclass`.