From: Andreas Sandberg Date: Mon, 27 Feb 2017 13:17:51 +0000 (+0000) Subject: ext: Fix undefined macro in pybind X-Git-Tag: v19.0.0.0~2832 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba42457254cc362eddc099f22b60d469cc6369e0;p=gem5.git ext: Fix undefined macro in pybind Change-Id: I63a2506d3c028f78cacce8308e2f0e4880531dec Signed-off-by: Andreas Sandberg Reviewed-by: Andreas Hansson Reviewed-by: Curtis Dunham Reviewed-on: https://gem5-review.googlesource.com/2230 Reviewed-by: Tony Gutierrez Reviewed-by: Jason Lowe-Power Reviewed-by: Pierre-Yves PĂ©neau --- diff --git a/ext/pybind11/include/pybind11/common.h b/ext/pybind11/include/pybind11/common.h index 712c1a5d6..f7a383007 100644 --- a/ext/pybind11/include/pybind11/common.h +++ b/ext/pybind11/include/pybind11/common.h @@ -558,7 +558,8 @@ PYBIND11_DECL_FMT(bool, "?"); struct nodelete { template void operator()(T*) { } }; // overload_cast requires variable templates: C++14 or MSVC 2015 Update 2 -#if defined(PYBIND11_CPP14) || _MSC_FULL_VER >= 190023918 +#if defined(PYBIND11_CPP14) || ( \ + defined(_MSC_FULL_VER) &&_MSC_FULL_VER >= 190023918) #define PYBIND11_OVERLOAD_CAST 1 NAMESPACE_BEGIN(detail) diff --git a/ext/pybind11/include/pybind11/stl.h b/ext/pybind11/include/pybind11/stl.h index d4b0fc914..7d6e8b102 100644 --- a/ext/pybind11/include/pybind11/stl.h +++ b/ext/pybind11/include/pybind11/stl.h @@ -246,7 +246,7 @@ template struct optional_caster { PYBIND11_TYPE_CASTER(T, _("Optional[") + value_conv::name() + _("]")); }; -#if PYBIND11_HAS_OPTIONAL +#ifdef PYBIND11_HAS_OPTIONAL template struct type_caster> : public optional_caster> {}; @@ -254,7 +254,7 @@ template<> struct type_caster : public void_caster {}; #endif -#if PYBIND11_HAS_EXP_OPTIONAL +#ifdef PYBIND11_HAS_EXP_OPTIONAL template struct type_caster> : public optional_caster> {};