This line uses the symbol I, but I is a macro defined in <complex.h> in C99. So, if complex.h is included before mdspan, a compilation error might occur.
It seems this may be a bug with the complex.h header shipped with certain compilers; they are probably supposed to guard the macro definition inside #ifndef __cplusplus. Therefore I close this issue now.
This line uses the symbol
I
, butI
is a macro defined in<complex.h>
in C99. So, ifcomplex.h
is included beforemdspan
, a compilation error might occur.I come across this issue in https://github.com/scipy/scipy/issues/21376.
I’m not sure if this is a bug, because I’m not sure how C99 and C++20 are supposed to work together, and
I
is a perfectly legal symbol for use in C++.