Removes __promote when it's just the identity.
Details
Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rGf7b8f7273b0e: [libc++][math.h] Remove unnecessary uses of __promote
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
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.
Comment Actions
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.
Comment Actions
Yes. There are older version of this library that override
is_floating_point for the half type it provides.
Though it looks like newer versions have a different approach.
https://sourceforge.net/projects/half/