mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
Make sort work on sealed ranges that don't explicitly define moveFront() and friends as long as these are implicitly defined.
This commit is contained in:
parent
d9cd5b19d0
commit
b1bb7afb36
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue