mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Revert "Merge pull request #707 from eco/real-lambdas"
Because of the auto-tester breaking. This reverts commitd5319fcfb6
, reversing changes made to5313288dd1
.
This commit is contained in:
parent
9d91e1de2f
commit
4c4c35c922
2 changed files with 232 additions and 255 deletions
483
std/algorithm.d
483
std/algorithm.d
File diff suppressed because it is too large
Load diff
|
@ -6536,7 +6536,7 @@ enum SearchPolicy
|
||||||
assert(!r.contains(42)); // passes although it shouldn't
|
assert(!r.contains(42)); // passes although it shouldn't
|
||||||
----
|
----
|
||||||
*/
|
*/
|
||||||
struct SortedRange(Range, alias pred = ((a, b) => a < b))
|
struct SortedRange(Range, alias pred = "a < b")
|
||||||
if (isRandomAccessRange!Range)
|
if (isRandomAccessRange!Range)
|
||||||
{
|
{
|
||||||
private alias binaryFun!pred predFun;
|
private alias binaryFun!pred predFun;
|
||||||
|
@ -7047,7 +7047,7 @@ unsorted range failing the test is very high (however, an
|
||||||
almost-sorted range is likely to pass it). To check for sortedness at
|
almost-sorted range is likely to pass it). To check for sortedness at
|
||||||
cost $(BIGOH n), use $(XREF algorithm,isSorted).
|
cost $(BIGOH n), use $(XREF algorithm,isSorted).
|
||||||
*/
|
*/
|
||||||
auto assumeSorted(alias pred = ((a, b) => a < b), R)(R r)
|
auto assumeSorted(alias pred = "a < b", R)(R r)
|
||||||
if (isRandomAccessRange!(Unqual!R))
|
if (isRandomAccessRange!(Unqual!R))
|
||||||
{
|
{
|
||||||
return SortedRange!(Unqual!R, pred)(r);
|
return SortedRange!(Unqual!R, pred)(r);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue