[PATCH] D53670: Revert "Teach __libcpp_is_floating_point that __fp16 and _Float16 are"
Eric Fiselier via Phabricator
reviews at reviews.llvm.org
Wed Oct 24 15:57:34 PDT 2018
EricWF added a comment.
In https://reviews.llvm.org/D53670#1275144, @ldionne wrote:
> In https://reviews.llvm.org/D53670#1275107, @EricWF wrote:
>
> > Sorry I'm late to the party, but we should just be falling back to `__is_floating_point` if we have it. Since it will always give us the answer we want. (Including for `__float128` which we don't handle ATM).
>
>
> That doesn't change the fact that it would be lying about what it means to be a floating point type, wouldn't it? For example, `numeric_limits` would still not be defined for `__fp16`, right?
If it acts like a floating point type, and the compiler says it's a floating point type, then it's a floating point type; regardless of what the C++ standard says.
We shouldn't pretend these types don't exist.
If the compiler provides the types, it means someone went through a ton of trouble in order to provide these additional types to users. So the question we should be asking is "What's in the best interest of our users?",
> As a side question, do you know how `numeric_limits` are implemented for `__float128`?
Repository:
rL LLVM
https://reviews.llvm.org/D53670
More information about the libcxx-commits
mailing list