diff --git a/std/algorithm.d b/std/algorithm.d index 0c4173984..447b702be 100644 --- a/std/algorithm.d +++ b/std/algorithm.d @@ -6875,9 +6875,9 @@ struct Until(alias pred, Range, Sentinel) if (isInputRange!Range) private bool predSatisfied() { static if (is(Sentinel == void)) - return unaryFun!pred(_input.front); + return cast(bool) unaryFun!pred(_input.front); else - return startsWith!pred(_input, _sentinel); + return cast(bool) startsWith!pred(_input, _sentinel); } void popFront() @@ -6992,6 +6992,12 @@ unittest // bugzilla 13171 assert(equal(a, [0, 0, 3, 4])); } +unittest // Issue 13124 +{ + auto s = "hello how\nare you"; + s.until!(c => c.among!('\n', '\r')); +} + /** Checks whether the given $(XREF2 range, isInputRange, input range) starts with (one of) the given needle(s).