mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
Fix issue 20554 - std.algorithm.searching.all 's static assert produces a garbled error message
This commit is contained in:
parent
d0bf92cab7
commit
dc2bf7901f
1 changed files with 3 additions and 1 deletions
|
@ -122,7 +122,9 @@ template all(alias pred = "a")
|
|||
if (isInputRange!Range)
|
||||
{
|
||||
static assert(is(typeof(unaryFun!pred(range.front))),
|
||||
"`" ~ pred.stringof[1..$-1] ~ "` isn't a unary predicate function for range.front");
|
||||
"`" ~ (isSomeString!(typeof(pred))
|
||||
? pred.stringof[1..$-1] : pred.stringof)
|
||||
~ "` isn't a unary predicate function for range.front");
|
||||
import std.functional : not;
|
||||
|
||||
return find!(not!(unaryFun!pred))(range).empty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue