cmp.cmp

  1. auto cmp(A sl1, B sl2)
    template cmp(alias pred = "a < b")
    @optmath
    static if(__traits(isSame, naryFun!pred, pred))
    cmp
    (
    A
    B
    )
    (
    scope A sl1
    ,
    scope B sl2
    )
    if (
    DimensionCount!A == DimensionCount!B
    )
  2. alias cmp = .cmp!(naryFun!pred)

Parameters

sl1 A

First slice, range, or array.

sl2 B

Second slice, range, or array.

Return Value

Type: auto

0 if both ranges compare equal. Negative value if the first differing element of sl1 is less than the corresponding element of sl2 according to pred. Positive value if the first differing element of sl2 is less than the corresponding element of sl1 according to pred.

Meta