1
0

Implement Array!T.opCmp

This commit is contained in:
otya128
2017-07-04 15:39:50 +09:00
parent 42fc64c136
commit 81bfff3e7c

View File

@@ -630,6 +630,13 @@ class Array(T)
{
return new Array!T(this);
}
public override int opCmp(Object o)
{
Array!T array = cast(Array!T)o;
if (!array)
return super.opCmp(o);
return std.algorithm.comparison.cmp(this.array, array.array);
}
}
struct ArrayReference(T)