Skip to content

Commit 304f7d7

Browse files
committed
fixup! [libc][math][c23] Add fabsf16 C23 math function
Simplify cpp::is_floating_point.
1 parent 079c7ad commit 304f7d7

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

libc/src/__support/CPP/type_traits/is_floating_point.h

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,17 @@ template <typename T> struct is_floating_point {
2424
}
2525

2626
public:
27-
#if defined(LIBC_TYPES_HAS_FLOAT16) && defined(LIBC_TYPES_HAS_FLOAT128)
2827
LIBC_INLINE_VAR static constexpr bool value =
29-
__is_unqualified_any_of<T, float, double, long double, float16,
30-
float128>();
31-
#elif defined(LIBC_TYPES_HAS_FLOAT16)
32-
LIBC_INLINE_VAR static constexpr bool value =
33-
__is_unqualified_any_of<T, float, double, long double, float16>();
34-
#elif defined(LIBC_TYPES_HAS_FLOAT128)
35-
LIBC_INLINE_VAR static constexpr bool value =
36-
__is_unqualified_any_of<T, float, double, long double, float128>();
37-
#else
38-
LIBC_INLINE_VAR static constexpr bool value =
39-
__is_unqualified_any_of<T, float, double, long double>();
40-
#endif // LIBC_TYPES_HAS_FLOAT128
28+
__is_unqualified_any_of<T, float, double, long double
29+
#ifdef LIBC_TYPES_HAS_FLOAT16
30+
,
31+
float16
32+
#endif
33+
#ifdef LIBC_TYPES_HAS_FLOAT128
34+
,
35+
float128
36+
#endif
37+
>();
4138
};
4239
template <typename T>
4340
LIBC_INLINE_VAR constexpr bool is_floating_point_v =

0 commit comments

Comments
 (0)