diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index bb1affcea..e2330bbe6 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -113,6 +113,9 @@ #include #include +/* Python #defines overrides on all sorts of core functions, which + tends to weak havok in C++ codebases that expect these to work + like regular functions (potentially with several overloads) */ #if defined(isalnum) # undef isalnum # undef isalpha @@ -123,6 +126,10 @@ # undef toupper #endif +#if defined(copysign) +# undef copysign +#endif + #if defined(_MSC_VER) # if defined(PYBIND11_DEBUG_MARKER) # define _DEBUG