On 2013-02-28 04:35, Rob T wrote:

I had a look at your isBlank function. Why not check if length exists
and run it as follows?

@property bool isBlank (T) (T t)
{

    static if (__traits(compiles, t.length))
    {
        if (t.length == 0)
           return true;
    }

...

That would be more generic I think.

Sure, I could do that. But I thought checking for "empty" would be more generic. I would expect every type having "length" would/should also have "empty" but perhaps that's a wrong assumption.

--
/Jacob Carlborg

Reply via email to