isEqual

Tests whether Args[0] is equal to Args[1].

$(D_PSYMBOL isEqual) checks first if Args can be compared directly. If not, they are compared as types: is(Args[0] == Args[1]). It it fails, the arguments are considered to be not equal.

If two items cannot be compared (for example comparing a type with a number), they are considered not equal.

Members

Variables

isEqual
enum bool isEqual;
Undocumented in source.
isEqual
enum bool isEqual;
Undocumented in source.

Parameters

Args

Two aliases to compare for equality.

Return Value

$(D_KEYWORD true) if Args[0] is equal to Args[1], $(D_KEYWORD false) otherwise.

Examples

static assert(isEqual!(int, int));
static assert(isEqual!(8, 8));
static assert(!isEqual!(int, const(int)));
static assert(!isEqual!(5, int));
static assert(!isEqual!(5, 8));

Meta