Re: math.pow fails at compile-time; is this a bug?

2012-08-20 Thread Jonathan M Davis
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

Re: math.pow fails at compile-time; is this a bug?

2012-08-20 Thread ixid
Why would one thing be CTFE-able and another not? I mean what are the traits that prevent something being CTFE.

Re: math.pow fails at compile-time; is this a bug?

2012-08-19 Thread Jonathan M Davis
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

math.pow fails at compile-time; is this a bug?

2012-08-19 Thread Caligo
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(