Jarrett Billingsley Wrote:

> Can you post more of your code?

I've reduced it to this:


bool isEmptyString(string str) {                
        static if (str == "") return true;
        return false;
}

void main()
{
        static if (isEmptyString(""))
        {
                int x = 1;
        }
}


test.d(5): Error: expression str == "" is not constant or does not evaluate to 
a bool
test.d(11): Error: cannot evaluate isEmptyString("") at compile time
test.d(11): Error: expression isEmptyString("") is not constant or does not 
evaluate to a bool

DMD  v2.031 on OS X

Reply via email to