From 3d079fbd545e3ac17700292d8005311871e0c64d Mon Sep 17 00:00:00 2001
From: Pim Schellart
Date: Wed, 3 Aug 2016 10:36:22 -0400
Subject: [PATCH] Fix zero valued enum comparison error
---
include/pybind11/pybind11.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h
index 975cf144..ae5a7542 100644
--- a/include/pybind11/pybind11.h
+++ b/include/pybind11/pybind11.h
@@ -1019,7 +1019,7 @@ public:
this->def("__init__", [](Type& value, UnderlyingType i) { new (&value) Type((Type) i); });
this->def("__int__", [](Type value) { return (UnderlyingType) value; });
this->def("__eq__", [](const Type &value, Type *value2) { return value2 && value == *value2; });
- this->def("__eq__", [](const Type &value, UnderlyingType value2) { return value2 && value == value2; });
+ this->def("__eq__", [](const Type &value, UnderlyingType value2) { return value == value2; });
this->def("__ne__", [](const Type &value, Type *value2) { return !value2 || value != *value2; });
this->def("__ne__", [](const Type &value, UnderlyingType value2) { return value != value2; });
this->def("__hash__", [](const Type &value) { return (UnderlyingType) value; });