On Thu, 14 Feb 2013 06:58:12 -0500, Jacob Carlborg <[email protected]> wrote:
On 2013-02-14 10:46, Walter Bright wrote:I don't understand why one would go around the horn to just check for !empty.I've tried to explain, it shows what the intention is.Instead of "str.length == 0" I use "str.empty". Instead of "!str.empty" I like to use "str.any".It's not a big deal but I would need to change quite a lot of code if "str.any" isn't allowed.
Would this work?
bool any(R)(R r) if(isInputRange!R) { return !r.empty;}
-Steve
