Don Wrote: > > Why are they templated to begin with? Just for the heck of it? > > > > bool opEquals(ref const BigInt y) const > > bool opEquals(long y) const > > No, because then it fails for ulong. > It's those bloody C implicit conversions.
hmm... works for me: --- struct A { bool opEquals(ref const A y) const { return false; } bool opEquals(long y) const { return true; } } int main() { A a; ulong b=42; assert(a==b); return 0; } ---