MutexedAA.opEquals

Implements opEquals for this type, comparing the internal associative array with that of another MutexedAA.

  1. auto opEquals(typeof(this) other)
    struct MutexedAA(AA : V[K], V, K)
    opEquals
    ()
  2. auto opEquals(AA other)

Parameters

other typeof(this)

Other MutexedAA whose internal associative array to compare with the one of this instance.

Return Value

Type: auto

true if the internal associative arrays are equal; false if not.

Examples

MutexedAA!(string[int]) aa1;
aa1.setup();  // important!
aa1[1] = "one";

MutexedAA!(string[int]) aa2;
aa2.setup();  // as above
aa2[1] = "one";
assert(aa1 == aa2);

aa2[2] = "two";
assert(aa1 != aa2);

aa1[2] = "two";
assert(aa1 == aa2);

Meta