[PATCH] D53486: [libcxx] Only define __libcpp_is_floating_point<_Float16> for Clang

Marshall Clow via Phabricator reviews at reviews.llvm.org
Tue Oct 23 16:16:13 PDT 2018


mclow.lists added a comment.

Searching through the current draft standard, I see the following bits that are not covered by this patch:

- For every pair of floating-point types L and R , there exists a candidate operator function of the form

`std::partial_ordering operator<=>(L, R)`;

- though, to be fair, we don't have the rest of these in libc++ yet.

- A non-type template-parameter shall not be declared to have floating-point or void type. [Example: template<double d> class X; ]
- What about `numeric_limits`? "Specializations shall be provided for each arithmetic type, both floating-point and integer, including bool"
- Where are the IO operations: `operator<<` and `operator>>`? What about `to_string`?
- How does this hook into `<cfenv>?
- What about all the stuff in `<cmath>`? `acos/asin/atan/etc`? They're defined for all the *other* floating point types.
- There's the fun wording in [time.traits.is_fp] about durations with floating point representations.
- How about support for duration literals? *(chrono again)
- No support for `complex`; that's fine, since "The effect of instantiating the template complex for any type other than float, double, or long double is unspecified"
- No support for `atomic_ref`; that's allowed, since "There are specializations of the atomic_ref class template for the floating-point types float, double, and long double. "
- No support for `atomic`; that's allowed, since "There are specializations of the atomic class template for the floating-point types float, double, and long double. "

The point I'm trying to make here is that it's a lot more complicated than saying "Hey - this type here is a floating point type".


Repository:
  rCXX libc++

https://reviews.llvm.org/D53486





More information about the libcxx-commits mailing list