Skip to content

Commit

Permalink
[libc] Fix missing LIBC_TYPES_HAS_FLOAT16 guard around DyadicFloat::g…
Browse files Browse the repository at this point in the history
  • Loading branch information
overmighty authored Sep 23, 2024
1 parent 3db0f8c commit 6267f12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc/src/__support/FPUtil/dyadic_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ template <size_t Bits> struct DyadicFloat {
return exponent + (Bits - 1);
}

#ifdef LIBC_TYPES_HAS_FLOAT16
template <typename T, bool ShouldSignalExceptions>
LIBC_INLINE constexpr cpp::enable_if_t<
cpp::is_floating_point_v<T> && (FPBits<T>::FRACTION_LEN < Bits), T>
Expand Down Expand Up @@ -207,6 +208,7 @@ template <size_t Bits> struct DyadicFloat {

return FPBits(result).get_val();
}
#endif // LIBC_TYPES_HAS_FLOAT16

template <typename T, bool ShouldSignalExceptions,
typename = cpp::enable_if_t<cpp::is_floating_point_v<T> &&
Expand Down

0 comments on commit 6267f12

Please sign in to comment.