FFDIFFSIGN

Comparator. For two numerical expressions x and y, gives 1 if x > y, -1 if x < y, and 0 if x == y. This is useful for instance in a qsort comparator callback. Furthermore, compilers are able to optimize this to branchless code, and there is no risk of overflow with signed types. As with many macros, this evaluates its argument multiple times, it thus must not have a side-effect.

extern (C) @nogc nothrow extern (D)
FFDIFFSIGN
(
T0
T1
)
(
auto ref T0 x
,
auto ref T1 y
)

Meta