[PATCH] D66836: [libc++] Add `__truncating_cast` for safely casting float types to integers

Steve Canon via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 05:30:02 PDT 2019


scanon accepted this revision.
scanon added a comment.
This revision is now accepted and ready to land.

I believe that the code can still be simplified somewhat, but that it's correct as-is for `float`, `double`, and `long double`. I'll take an AI to follow-up on future improvements, and let's get this in.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66836/new/

https://reviews.llvm.org/D66836





More information about the cfe-commits mailing list