mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-01-23 15:33:33 +08:00
Fix #75 <complex> may define macro I
Fix #75 as described by undefining the macro `I` from `<complex>` if defined (as in `glibc`). This seems to be the only include of it.
This commit is contained in:
parent
80a06745d3
commit
30214adc0a
@ -12,6 +12,11 @@
|
||||
#include "pybind11.h"
|
||||
#include <complex>
|
||||
|
||||
/// glibc defines I as a macro which breaks things, e.g., boost template names
|
||||
#ifdef I
|
||||
# undef I
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(pybind11)
|
||||
|
||||
PYBIND11_DECL_FMT(std::complex<float>, "Zf");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user