Hello Curtis Dunham,

I'd like you to do a code review. Please visit

    https://gem5-review.googlesource.com/2230

to review the following change.


Change subject: ext: Fix undefined macro in pybind
......................................................................

ext: Fix undefined macro in pybind

Change-Id: I63a2506d3c028f78cacce8308e2f0e4880531dec
Signed-off-by: Andreas Sandberg <[email protected]>
Reviewed-by: Andreas Hansson <[email protected]>
Reviewed-by: Curtis Dunham <[email protected]>
---
M ext/pybind11/include/pybind11/common.h
M ext/pybind11/include/pybind11/stl.h
2 files changed, 4 insertions(+), 3 deletions(-)



diff --git a/ext/pybind11/include/pybind11/common.h b/ext/pybind11/include/pybind11/common.h
index 712c1a5..f7a3830 100644
--- a/ext/pybind11/include/pybind11/common.h
+++ b/ext/pybind11/include/pybind11/common.h
@@ -558,7 +558,8 @@
 struct nodelete { template <typename T> 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 d4b0fc9..7d6e8b1 100644
--- a/ext/pybind11/include/pybind11/stl.h
+++ b/ext/pybind11/include/pybind11/stl.h
@@ -246,7 +246,7 @@
     PYBIND11_TYPE_CASTER(T, _("Optional[") + value_conv::name() + _("]"));
 };

-#if PYBIND11_HAS_OPTIONAL
+#ifdef PYBIND11_HAS_OPTIONAL
 template<typename T> struct type_caster<std::optional<T>>
     : public optional_caster<std::optional<T>> {};

@@ -254,7 +254,7 @@
     : public void_caster<std::nullopt_t> {};
 #endif

-#if PYBIND11_HAS_EXP_OPTIONAL
+#ifdef PYBIND11_HAS_EXP_OPTIONAL
 template<typename T> struct type_caster<std::experimental::optional<T>>
     : public optional_caster<std::experimental::optional<T>> {};


--
To view, visit https://gem5-review.googlesource.com/2230
To unsubscribe, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63a2506d3c028f78cacce8308e2f0e4880531dec
Gerrit-Change-Number: 2230
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to