@@ -104,9 +104,9 @@ { alias SC_Unqual!(T) UCT; static if(is(UCT == class)) - return (cast(UCT)x).toHash(); + return (x is null ? 0 : (cast(UCT)x).toHash()); else static if(SC_HasGoodHash!(UCT)) { return typeid(UCT).getHash(&x); } else @@ -157,10 +157,8 @@ } override int opCmp(Object rhs_) const /// member-by-member compare { - if( rhs_ is null ) - return -1; if( auto rhs = cast(typeof(this))rhs_ ) { foreach(i,_; this.tupleof) { @@ -200,9 +198,9 @@ assert_ne( new Temp(1,"foo"), new Temp(2,"foo") ); assert_ne( new Temp(1,"foo"), new Temp(1,"bar") ); assert_gt( new Temp(1,"foo"), new Temp(1,"bar") ); assert_lt( new Temp(1,"foo"), new Temp(2,"bar") ); - assert_ge( new Temp(1,"foo"), new Temp(1,"foo") ); + assert_ge( new Temp(1,"foo"), new Temp(1,"foo") ); class TempDummy { int x;