mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 07:02:11 +00:00
Fix zero valued enum comparison error
This commit is contained in:
parent
6c19f6e598
commit
3d079fbd54
@ -1019,7 +1019,7 @@ public:
|
|||||||
this->def("__init__", [](Type& value, UnderlyingType i) { new (&value) Type((Type) i); });
|
this->def("__init__", [](Type& value, UnderlyingType i) { new (&value) Type((Type) i); });
|
||||||
this->def("__int__", [](Type value) { return (UnderlyingType) value; });
|
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, 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, Type *value2) { return !value2 || value != *value2; });
|
||||||
this->def("__ne__", [](const Type &value, UnderlyingType value2) { return value != value2; });
|
this->def("__ne__", [](const Type &value, UnderlyingType value2) { return value != value2; });
|
||||||
this->def("__hash__", [](const Type &value) { return (UnderlyingType) value; });
|
this->def("__hash__", [](const Type &value) { return (UnderlyingType) value; });
|
||||||
|
Loading…
Reference in New Issue
Block a user