Equality of `pred` Template Parameters
via Digitalmars-d
digitalmars-d at puremagic.com
Mon Aug 17 02:23:55 PDT 2015
In https://github.com/D-Programming-Language/phobos/pull/3534
I'm in need of a generic and correct definition of
template isSortedRange(T, alias pred = "a < b")
at
https://github.com/D-Programming-Language/phobos/pull/3534/files#diff-9f63c74383984a09f5bf578493892e27R1005
To make it general we want it to support `pred` argument of types
other than `string`, typically
binaryFun!"a < b"
Specifically, we want `isSortedRange` to "understand" that
binaryFun!"a < b"
binaryFun!"a<b"
are equvialent and
binaryFun!"a < b"
binaryFun!"a > b"
are not (opposites). I'm guessing there is compile-time-parsing
somewhere in Phobos that already does this. Could/Should this be
extracted and reused?
Destroy!
More information about the Digitalmars-d
mailing list