On Monday, August 20, 2012 10:52:39 ixid wrote:
> Why would one thing be CTFE-able and another not? I mean what are
> the traits that prevent something being CTFE.
http://dlang.org/function.html#interpretation
Also, while classes work to some extent in CTFE, they can't be assigned to
anything wh
Why would one thing be CTFE-able and another not? I mean what are
the traits that prevent something being CTFE.
On Sunday, August 19, 2012 23:38:01 Caligo wrote:
> template T(){
> enum a = pow(3.0, 2);
> enum b = pow(3, 2.0);
> }
>
> unittest
> {
> alias T!() t;
> }
>
> compiling that I get:
>
> /home/b/phobos/std/math.d(2369): Error: Cannot convert &real to ushort* at
> compile time
> /home/b/phobo
template T(){
enum a = pow(3.0, 2);
enum b = pow(3, 2.0);
}
unittest
{
alias T!() t;
}
compiling that I get:
/home/b/phobos/std/math.d(2369): Error: Cannot convert &real to ushort* at
compile time
/home/b/phobos/std/math.d(3292):called from here: isNaN(y)
/home/b/phobos/std/math.d(