Skip to content

Commit c9b4c64

Browse files
majnemerThe ml_dtypes Authors
authored andcommitted
Fix compilation on MSVC
MSVC complains about `(long double){}` so let's rephrase it. PiperOrigin-RevId: 590297660
1 parent 34d9e4e commit c9b4c64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ml_dtypes/_src/int4_numpy.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ bool CastToInt4(PyObject* arg, T* output) {
165165
return floating_conversion(double{});
166166
}
167167
if (PyArray_IsScalar(arg, LongDouble)) {
168-
return floating_conversion((long double){});
168+
using ld = long double;
169+
return floating_conversion(ld{});
169170
}
170171
return false;
171172
}

0 commit comments

Comments
 (0)