Implement auto-decoding free equal comparison

Fix #39.
This commit is contained in:
2018-06-12 20:19:06 +02:00
parent 15f7994187
commit a86b6690f0
7 changed files with 70 additions and 5 deletions

View File

@ -15,7 +15,6 @@
module tanya.container.array;
import core.checkedint;
import std.algorithm.comparison : equal;
import std.algorithm.mutation : bringToFront,
copy,
fill,

View File

@ -15,7 +15,6 @@
*/
module tanya.container.list;
import std.algorithm.comparison : equal;
import std.algorithm.searching;
import tanya.algorithm.comparison;
import tanya.algorithm.mutation;
@ -574,7 +573,7 @@ struct SList(T)
*/
bool opEquals()(auto ref typeof(this) that) inout
{
return equal(this[], that[]);
return equal(opIndex(), that[]);
}
///

View File

@ -26,7 +26,7 @@
*/
module tanya.container.string;
import std.algorithm.comparison : cmp, equal;
import std.algorithm.comparison : cmp;
import std.algorithm.mutation : bringToFront, copy;
import std.algorithm.searching;
import tanya.algorithm.comparison;