Change the overflow type of muls and mulu from bool to the underlying integer type. Since these functions are intended to be treated as intrinsics, the overflow can be easily obtained directly from the x86 mul / arm umull instruction.
pure nothrow @nogc @safe uint mulu(uint x, uint y, ref uint overflow);
pure nothrow @nogc @safe ulong mulu(ulong x, ulong y, ref ulong overflow);
pure nothrow @nogc @safe int muls(int x, int y, ref int overflow);
pure nothrow @nogc @safe long muls(long x, long y, ref long overflow);
Comment #1 by robert.schadek — 2024-12-07T13:36:04Z