Bug 646323 - Rewrite mfbt/Casting.h assertion in modern style, and teach it to...
Bug 646323 - Rewrite mfbt/Casting.h assertion in modern style, and teach it to deal with floating point values. r=kinetik This now uses `if constexpr (...)` which is a lot more readable, and still compiles to almost no assembly instructions, as expected. Floating point casting assert when casting an integer that's too large to be represented exactly as a floating point (e.g. UINT64_MAX to double, since double have less than 64 bytes of mantissa), or when casting a double that's too large to be represented in a float. Differential Revision: https://phabricator.services.mozilla.com/D167955
Loading
Please register or sign in to comment