commit | c9ac8d533010d8915bcfdecab891fb451f71ce74 | [log] [tgz] |
---|---|---|
author | Louis Dionne <ldionne@apple.com> | Wed Sep 04 12:48:32 2019 +0000 |
committer | Louis Dionne <ldionne@apple.com> | Wed Sep 04 12:48:32 2019 +0000 |
tree | 278e294db83a896dbabccbff51b7920e2e0ba4f8 | |
parent | 40f365f4c4f9183bd6d845ce3d4e9bb876ed123d [diff] |
[libc++] Add `__truncating_cast` for safely casting float types to integers This is needed anytime we need to clamp an arbitrary floating point value to an integer type. Thanks to Eric Fiselier for the patch. Differential Revision: https://reviews.llvm.org/D66836 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@370891 91177308-0d34-0410-b5e6-96231b3b80d8