Skip to content
Snippets Groups Projects
Commit 65406dde authored by Paul Adenot's avatar Paul Adenot
Browse files

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
parent b3be76a2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment