On Sunday, 13 July 2014 at 11:18:05 UTC, bearophile wrote:
The idea of not making std.algorithm.among!() a predicate was not so good:


void main() {
    import std.stdio, std.algorithm;
    auto s = "hello how\nare you";
    s.until!(c => c.among!('\n', '\r')).writeln;
}


(A normal workaround is to use !!c.among!).

Bye,
bearophile

That's weird, I always assumed this worked. Was it always the case that numeric types can't be implicitly casted to bool?

Reply via email to