Vector.opCmp

Compares the contents of a vector with another vector or range.

  1. int opCmp(R rhs)
    struct Vector
    const scope nothrow
    int
    opCmp
    (
    R
    )
    (
    scope R rhs
    )
  2. int opCmp(V rhs)

Examples

auto a1 = Vector!(int, 6).build(1, 2, 3);
auto a2 = Vector!(int, 6).build(1, 2, 3, 4);
auto b = Vector!(int, 6).build(3, 2, 1);

assert(a1 < b);
assert(a1 < a2);
assert(a2 < b);
assert(a1 <= a1);

Meta