Comparator

Takes template parameter F, which is used to compare two objects of some type.

F should be a callable accepting exactly 2 arguments of the same type a returning a $(D_KEYWORD bool).

struct Comparator (
F...
) if (
F.length == 1 &&
isCallable!(F[0])
&&
is(ReturnType!F == bool)
&&
allSameType!(Parameters!F)
&&
Parameters!F.length == 2
) {}

Parameters

F

The actual comparator.

Meta