https://issues.dlang.org/show_bug.cgi?id=11188
b2.t...@gmx.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |b2.t...@gmx.com Summary|std.math.abs fails for |std.math.abs fails for |shared, const or immutable |shared BigInt type |BigInt types | --- Comment #10 from b2.t...@gmx.com --- Only valid for shared nowadays import std.bigint, std.math, std.typetuple; auto foo(T)() { T n = -3; return std.math.abs(n); } void main() { foreach (T; TypeTuple!(byte, short, int, long, BigInt)) { assert(foo!T() == 3); // works assert(foo!(shared(T)) == 3); // fails for BigInt } } The problem is that operator overloads don't accept shared void main() { import std.bigint; shared(BigInt) i = 0; assert(i >= 0); } --