typeof(SortedRange) and is operator

RazvanN via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Nov 8 05:18:43 PST 2016


Given the following code:

int[] arr = [1, 2, 9, 4, 10, 6];
auto r    = sort(arr);

if(is(typeof(r) == SortedRange!(int[], "a<b")))
writeln("first if");
  12
  13     if(is(typeof(r) == SortedRange!(int[], "a < b")))
  14         writeln("second if");



More information about the Digitalmars-d-learn mailing list