typeof(SortedRange) and is operator

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


Sorry, I accidentally posted the above message and I don't know 
how to erase it.
The following post is the complete one:

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");

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

The program outputs only "second if". I assumed that it should 
have printed both
ifs. Is this a bug?

Best regards,
RazvanN



More information about the Digitalmars-d-learn mailing list