[libcxx-commits] [PATCH] D127226: [libc++] Simplify type_traits and use more builtins

Alan Zhao via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 16 14:18:00 PDT 2022


ayzhao added a comment.

This is causing build breakages in Chrome as we use `std::numeric_limits<__float128>`.

After this change, `std::is_arithmetic<__float128>::value` is now `true` instead of `false` [0]. Observe that for GCC's `libstdc++`, the value is also `false`.

This causes `std::numeric_limits<__float128>` to fail to compile [1]. This is because `std::numeric_limits` inherits from `__libcpp_numeric_limits`, which refers to `std::is_arithmetic` in its template parameters. The change from `false` to `true` causes `libc++` to instantiate some illegal template usages of `__float128`.

[0]: https://godbolt.org/z/EjnY8Th1d  Note: at the time of this comment, the output of x86-64 clang(trunk) returned 1 - everything else returns 0.
[1]: https://godbolt.org/z/94PhTsabf Note: at the time of this comment, the output of x86-64 clang(trunk) is https://pastebin.com/w0kRFqB0
[2]: https://github.com/llvm/llvm-project/blob/911841f717eb8acaccf4f3deb5f85fbf6903f55f/libcxx/include/limits#L144-L145


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127226



More information about the libcxx-commits mailing list