[libcxx-commits] [PATCH] D67900: [libc++] Use builtin type traits whenever possible

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 31 22:00:14 PDT 2020


zoecarver added a comment.

@tcwang here's you're reproducer: https://godbolt.org/z/RJtTBG

Looks like we don't have any `__float128` tests not only in numeric limits but in libc++ altogether.

Anyway, to address the problem: `is_arithmetic_v<__float128>` is true after this patch and false before this patch. It seems like returning true is the correct behavior so the change should probably happen in numeric limits. It's not entirely clear what that change should be, though. Do we want to support `__float128` in `numeric_limits`? We don't seem to support it anywhere else. Maybe add a `static_assert` so that future bugs are easier to track down?

In the meantime, `numeric_limits` just returned `0` for `numeric_limits< __float128 >::min()` so maybe you can replace the current use with that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67900





More information about the libcxx-commits mailing list