[libcxx-commits] [PATCH] D136868: [libc++][math.h] Remove unnecessary uses of __promote

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 28 11:03:44 PDT 2022


ldionne added a comment.

In D136868#3892502 <https://reviews.llvm.org/D136868#3892502>, @EricWF wrote:

> What happens here with __fp16 or other extended floating point types.
> Users have been known to specialize is_floating_point to make these things work.

Users are not allowed to do that because `__fp16` is not a user-defined type, so they can't specialize a type trait in namespace `std` AFAICT. And if someone did do that, TBH it would be broken in way more ways than just this.

IMO the path forward here for custom floating point types is to do http://wg21.link/p1467 and consider the problem in its entirety.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136868



More information about the libcxx-commits mailing list