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

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 27 15:24:24 PDT 2019


EricWF created this revision.
EricWF added reviewers: mclow.lists, ldionne.
Herald added subscribers: libcxx-commits, dexonsmith, christof.

This is needed anytime we need to clamp an arbitrary floating point value to an integer type.


Repository:
  rCXX libc++

https://reviews.llvm.org/D66836

Files:
  include/math.h
  test/libcxx/numerics/truncating_cast.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66836.217513.patch
Type: text/x-patch
Size: 3891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190827/2786f6bc/attachment.bin>


More information about the libcxx-commits mailing list