http://d.puremagic.com/issues/show_bug.cgi?id=8562

           Summary: math.pow fails at compile-time
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: iteronve...@gmail.com


--- Comment #0 from Caligo <iteronve...@gmail.com> 2012-08-19 22:02:58 PDT ---
template T(){
  enum a = pow(3.0, 6);
  enum b = pow(2, 4.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(3403):        called from here: impl(x,cast(real)y)
/home/b/phobos/std/math.d(3239):        called from here: pow(cast(real)x,y)
t.d(478):        called from here: pow(2,4)
t.d(485): Error: template instance units.T!() error instantiating


I guess technically it's math.isNaN() that's failing?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to