Don wrote: > Rainer Deyke wrote: >> Not quite. Under the proposal, -1^^-1 works (i.e. produces the correct >> result) at compile time but fails at runtime. > > It won't pass CTFE.
pure int f() { return -1; }
void g(int)(int);
g!(f() ^^ f())(0); // Works.
g!(0)(f() ^^ f()); // Runtime error?
'f() ^^ f()' can be a compile-time constant, but isn't guaranteed to be
evaluated at compile time.
--
Rainer Deyke - [email protected]
