Skip to content

Commit

Permalink
fix: check that cfloat128 is not defined _Complex long double
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh0g0-1758 committed Dec 10, 2024
1 parent aac000a commit 8f3e7c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libc/src/__support/complex_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ template <> struct make_complex<float16> {
};
#endif
#if defined(LIBC_TYPES_HAS_CFLOAT128)
#if (LDBL_MANT_DIG != 113)
template <> struct make_complex<float128> {
using type = cfloat128;
};
#endif
#endif

template <typename T> using make_complex_t = typename make_complex<T>::type;

Expand All @@ -62,10 +64,12 @@ template <> struct make_real<cfloat16> {
};
#endif
#if defined(LIBC_TYPES_HAS_CFLOAT128)
#if (LDBL_MANT_DIG != 113)
template <> struct make_real<cfloat128> {
using type = float128;
};
#endif
#endif

template <typename T> using make_real_t = typename make_real<T>::type;

Expand Down

0 comments on commit 8f3e7c3

Please sign in to comment.