Array.opEquals

Comparison for equality.

  1. bool opEquals(typeof(this) that)
  2. bool opEquals(typeof(this) that)
  3. bool opEquals(R that)
  4. bool opEquals(R that)
    struct Array(T)
    const
    bool
    opEquals
    (
    R
    )
    ()
    if (
    is(R == Range) ||
    )

Parameters

R

Right hand side type.

that R

Right hand side array range.

Return Value

Type: bool

$(D_KEYWORD true) if the array and the range are equal, $(D_KEYWORD false) otherwise.

Examples

Array!int v1, v2;
assert(v1 == v2);

v1.length = 1;
v2.length = 2;
assert(v1 != v2);

v1.length = 2;
v1[0] = v2[0] = 2;
v1[1] = 3;
v2[1] = 4;
assert(v1 != v2);

v2[1] = 3;
assert(v1 == v2);

Meta