[CM] s7_complex does not compile for MSVC

bil at ccrma.Stanford.EDU bil at ccrma.Stanford.EDU
Wed Nov 20 11:36:55 PST 2024


Thanks!  All those references are interesting (and depressing).
I think there might be a typo in the patch you sent: _MSC_V
for _MSC_VER? Here's my current guess (with 2 clang++ cases so
I can switch back and forth more easily):

#if __TINYC__ || _MSC_VER || (__clang__ && __cplusplus)
   /* _MSC_VER (and clang++??) should also set HAVE_COMPLEX_NUMBERS to 0 
*/
   typedef double s7_complex;
#else
   #if __cplusplus /* only __GNUC__ */
     #include <complex>
     #ifdef __GNUC__
       typedef std::complex<s7_double> s7_complex;
     #else
       using s7_complex = std::complex<double>;
       /* sort of works in clang++ but there are many more problems */
     #endif
   #else
     #include <complex.h>
     typedef double complex s7_complex;
   #endif
#endif



More information about the Cmdist mailing list