eq

pure
bool
eq
(
A
B
)
(
in A a
,
in B b
)

Examples

assert(  eq( 1, 1.0 ) );
assert(  eq( "hello", "hello"w ) );
assert( !eq( cast(void[])"hello", cast(void[])"hello"w ) );
assert(  eq( cast(void[])"hello", cast(void[])"hello" ) );
assert(  eq( cast(void[])"hello", "hello" ) );
assert( !eq( cast(void[])"hello", "hello"w ) );
assert(  eq( [[1,2],[3,4]], [[1.0f,2],[3.0f,4]] ) );
assert( !eq( [[1,2],[3,4]], [[1.1f,2],[3.0f,4]] ) );
assert( !eq( [[1,2],[3,4]], [[1.0f,2],[3.0f]] ) );
assert(  eq( [1,2,3], [1.0,2,3] ) );
assert(  eq( [1.0f,2,3], [1.0,2,3] ) );
assert(  eq( [1,2,3], [1,2,3] ) );
assert( !eq( [1.0000001,2,3], [1,2,3] ) );
assert(  eq( ["hello","world"], ["hello","world"] ) );
assert( !eq( "hello", [1,2,3] ) );
static assert( !__traits(compiles, eq(["hello"],1)) );
static assert( !__traits(compiles, eq(["hello"],[1,2,3])) );

Meta