On Friday, 7 August 2015 at 11:45:22 UTC, Nordlöw wrote:
Can somebody please explain and help out with variadic version
of `isInstanceOf`?
Here's a try at isSortedRange:
enum bool isSortedRange(T, alias pred = "a < b") = is(T ==
SortedRange!(Args[0], pred), Args...);
unittest
{
alias R = int[];
enum pred = "a < b";
static assert(isSortedRange!(SortedRange!(R, pred),
pred));
}
but it fails. This simplified case
enum bool isSortedRange(T, alias pred = "a < b") = is(T ==
SortedRange!Args, Args...);
works.
How do check that the second template argument to the instance of
SortedRange matches `pred`?