Checking function parameters in Phobos
Jacob Carlborg
doob at me.com
Wed Nov 20 05:52:23 PST 2013
On 2013-11-20 13:56, Timon Gehr wrote:
> We do in any case:
>
> import std.algorithm, std.range;
>
> void main(){
> auto a = [1,2,3,4,5];
> auto s = sort(a);
> swap(a[0],a[$-1]);
> assert(is(typeof(s)==SortedRange!(int[])) && !s.isSorted());
> }
>
I don't understand what this is supposed to show. That the type is
"SortedRange" but it's actually not sorted?
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list