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

Tiancong Wang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 1 10:26:37 PDT 2020


tcwang added a comment.

In D67900#1954028 <https://reviews.llvm.org/D67900#1954028>, @zoecarver wrote:

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


Thank you!

> 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.

Thanks again for figuring out the problem.

> 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?

I don't think I understand what to replace. From the log I showed before, the error was from the header file vector all the way to  /usr/bin/../include/c++/v1/limits. Plus we don't own the code that has the error, and I didn't see float128 directly in the code. And I see many places using ::max() (not float128 type, or not clear to me it's float128 type). So I don't know how to proceed with it...


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