On 2013-02-14 15:28, Steven Schveighoffer wrote:

Would this work?

bool any(R)(R r) if(isInputRange!R) { return !r.empty;}

Yes, I already have something similar. Actually I have this:

@property bool any (T) (T value) if (__traits(compiles, { bool a = value.empty; }))
{
    return !value.empty;
}

--
/Jacob Carlborg

Reply via email to