On Friday, 13 December 2013 at 12:10:02 UTC, comco wrote:
Imagine a world in which a simple 'if' has the semantics of a static if, if the condition is evaluable at CT. Is this a world you would rather live in?

template Fac(int i) {
if (i == 0) { // static if; doesn't introduce scope
enum Fac = 1;
} else {
enum Fac = i * Fac!(i-1);
}
}

I would not rather live in it. I would rather live in:

    static foreach(...) // but that hasn't happened yet.

Reply via email to