mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
6f9c22bfa9
10 changed files with 686 additions and 407 deletions
|
@ -455,7 +455,7 @@ private struct MapResult(alias fun, Range)
|
|||
}
|
||||
}
|
||||
|
||||
static if (hasLength!R || isSomeString!R)
|
||||
static if (hasLength!R)
|
||||
{
|
||||
@property auto length()
|
||||
{
|
||||
|
@ -9949,10 +9949,7 @@ assert(!all!"a & 1"([1, 2, 3, 5, 7, 9]));
|
|||
bool all(alias pred, R)(R range)
|
||||
if (isInputRange!R && is(typeof(unaryFun!pred(range.front))))
|
||||
{
|
||||
// dmd @@@BUG9578@@@ workaround
|
||||
// return find!(not!(unaryFun!pred))(range).empty;
|
||||
bool notPred(ElementType!R a) { return !unaryFun!pred(a); }
|
||||
return find!notPred(range).empty;
|
||||
return find!(not!(unaryFun!pred))(range).empty;
|
||||
}
|
||||
|
||||
unittest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue