From b1bb7afb363bf2b1bccf52a4b07221d9ab52a12b Mon Sep 17 00:00:00 2001 From: David Simcha Date: Mon, 13 Sep 2010 22:57:12 +0000 Subject: [PATCH] Make sort work on sealed ranges that don't explicitly define moveFront() and friends as long as these are implicitly defined. --- std/algorithm.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/std/algorithm.d b/std/algorithm.d index 18e19f6e4..fa28910d6 100644 --- a/std/algorithm.d +++ b/std/algorithm.d @@ -4894,7 +4894,7 @@ Range partition(alias predicate, } else { - auto t1 = r.moveFront(), t2 = r.moveBack(); + auto t1 = moveFront(r), t2 = moveBack(r); r.front = t2; r.back = t1; } @@ -5315,8 +5315,8 @@ void swapAt(R)(R r, size_t i1, size_t i2) else { if (i1 == i2) return; - auto t1 = r.moveAt(i1); - auto t2 = r.moveAt(i2); + auto t1 = moveAt(r, i1); + auto t2 = moveAt(r, i2); r[i2] = t1; r[i1] = t2; }