Comment #0 by bearophile_hugs — 2011-08-12T15:25:47Z
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;
Comment #1 by safety0ff.bugz — 2013-03-31T16:02:03Z