mirror of
https://github.com/dlang/phobos.git
synced 2025-05-10 05:41:56 +03:00
Merge remote-tracking branch 'upstream/stable' into merge_stable
This commit is contained in:
commit
a3526d11dd
2 changed files with 18 additions and 2 deletions
|
@ -1342,7 +1342,6 @@ if (isInputRange!Range && !isInfinite!Range &&
|
|||
// if we only have one statement in the loop, it can be optimized a lot better
|
||||
static if (__traits(isSame, map, a => a))
|
||||
{
|
||||
|
||||
// direct access via a random access range is faster
|
||||
static if (isRandomAccessRange!Range)
|
||||
{
|
||||
|
@ -3865,6 +3864,14 @@ if (isInputRange!Range && !isInfinite!Range &&
|
|||
assert(arr.maxElement!"a.val".val == 1);
|
||||
}
|
||||
|
||||
// https://issues.dlang.org/show_bug.cgi?id=23993
|
||||
@safe unittest
|
||||
{
|
||||
import std.bigint : BigInt;
|
||||
|
||||
assert([BigInt(2), BigInt(3)].maxElement == BigInt(3));
|
||||
}
|
||||
|
||||
// minPos
|
||||
/**
|
||||
Computes a subrange of `range` starting at the first occurrence of `range`'s
|
||||
|
|
|
@ -9142,7 +9142,7 @@ public:
|
|||
{
|
||||
static if (needsEndTracker)
|
||||
{
|
||||
if (poppedElems < windowSize)
|
||||
if (nextSource.empty)
|
||||
hasShownPartialBefore = true;
|
||||
}
|
||||
else
|
||||
|
@ -10122,6 +10122,15 @@ public:
|
|||
assert("ab cd".splitter(' ').slide!(No.withPartial)(2).equal!equal([["ab", "cd"]]));
|
||||
}
|
||||
|
||||
// https://issues.dlang.org/show_bug.cgi?id=23976
|
||||
@safe unittest
|
||||
{
|
||||
import std.algorithm.comparison : equal;
|
||||
import std.algorithm.iteration : splitter;
|
||||
|
||||
assert("1<2".splitter('<').slide(2).equal!equal([["1", "2"]]));
|
||||
}
|
||||
|
||||
private struct OnlyResult(Values...)
|
||||
if (Values.length > 1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue