mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-23 05:35:13 +00:00
Merge pull request #709 from jagerman/enum-extra-constructor
Remove extraneous `enum_` python constructor
This commit is contained in:
commit
38fc542f97
@ -1143,7 +1143,6 @@ public:
|
|||||||
return m;
|
return m;
|
||||||
}, return_value_policy::copy);
|
}, return_value_policy::copy);
|
||||||
def("__init__", [](Type& value, Scalar i) { value = (Type)i; });
|
def("__init__", [](Type& value, Scalar i) { value = (Type)i; });
|
||||||
def("__init__", [](Type& value, Scalar i) { new (&value) Type((Type) i); });
|
|
||||||
def("__int__", [](Type value) { return (Scalar) value; });
|
def("__int__", [](Type value) { return (Scalar) value; });
|
||||||
def("__eq__", [](const Type &value, Type *value2) { return value2 && value == *value2; });
|
def("__eq__", [](const Type &value, Type *value2) { return value2 && value == *value2; });
|
||||||
def("__ne__", [](const Type &value, Type *value2) { return !value2 || value != *value2; });
|
def("__ne__", [](const Type &value, Type *value2) { return !value2 || value != *value2; });
|
||||||
|
Loading…
Reference in New Issue
Block a user