Function DList.opEquals

Comparison for equality.

inout bool opEquals (
  auto ref typeof(this) that
);

Parameters

NameDescription
that The list to compare with.

Returns

true if the lists are equal, false otherwise.

Example

DList!int l1, l2;

l1.insertFront(8);
l1.insertFront(9);
l2.insertFront(8);
l2.insertFront(10);
assert(l1 != l2);

l1.removeFront();
assert(l1 != l2);

l2.removeFront();
assert(l1 == l2);

l1.removeFront();
assert(l1 != l2);

l2.removeFront();
assert(l1 == l2);