Summary: std.math.abs(BigInt)
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from 2011-08-12 15:25:47 PDT ---
I'd like to use std.math.abs on a BigInt too:

import std.bigint, std.math;
void main() {
    auto r = abs(BigInt(-1000));

But dmd 2.054 gives:

...\src\phobos\std\math.d(251): Error: pure function 'abs' cannot call impure
function 'opCmp'
...\src\phobos\std\math.d(251): Error: safe function 'abs' cannot call system
function 'opCmp'

Line 251 of math.d is:

return x>=0 ? x : -x;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to