Implement Array!T.opCmp
This commit is contained in:
1 parent
42fc64c136
commit
81bfff3e7c
1 file changed
+7
@@ -630,6 +630,13 @@ class Array(T)
|
|||||||
{
|
{
|
||||||
return new Array!T(this);
|
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)
|
struct ArrayReference(T)
|
||||||
|
|||||||
Reference in new issue
Block a user