Address6.opCmp

Compares two Address6 objects.

If $(D_KEYWORD this) and that contain the same address, scope IDs are compared.

  1. int opCmp(Address6 that)
    struct Address6
    const @nogc nothrow pure @safe
    int
    opCmp
    (
    ref const Address6 that
    )
  2. int opCmp(Address6 that)

Parameters

that Address6

Another address.

Return Value

Type: int

Positive number if $(D_KEYWORD this) is larger than that, negative - if it is smaller, or 0 if they equal.

Examples

assert(address6("::14").get > address6("::1").get);
assert(address6("::1").get < address6("::14").get);
assert(address6("::1") == address6("::1"));
assert(address6("fe80::1%1").get < address6("fe80::1%2").get);
assert(address6("fe80::1%2").get > address6("fe80::1%1").get);

Meta