From 30214adc0a39b0bb144e060184b47f4e26ad6757 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Thu, 21 Jan 2016 17:42:46 +0100 Subject: [PATCH] Fix #75 may define macro I Fix #75 as described by undefining the macro `I` from `` if defined (as in `glibc`). This seems to be the only include of it. --- include/pybind11/complex.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/pybind11/complex.h b/include/pybind11/complex.h index 10da21d02..a140f6feb 100644 --- a/include/pybind11/complex.h +++ b/include/pybind11/complex.h @@ -12,6 +12,11 @@ #include "pybind11.h" #include +/// 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, "Zf");