[libc] Fix buildbot failures (#156733)

Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
This commit is contained in:
Krishna Pandey
2025-09-04 00:39:54 +05:30
committed by GitHub
parent 88c3825889
commit d7a08c5a80

View File

@@ -29,7 +29,9 @@ struct BFloat16 {
LIBC_INLINE BFloat16() = default;
template <typename T> LIBC_INLINE constexpr explicit BFloat16(T value) {
template <typename T>
LIBC_INLINE constexpr explicit BFloat16(T value)
: bits(static_cast<uint16_t>(0U)) {
if constexpr (cpp::is_floating_point_v<T>) {
bits = fputil::cast<bfloat16>(value).bits;
} else if constexpr (cpp::is_integral_v<T>) {