From e370520918e662826092afb57cc0403f845dcbd4 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Sat, 4 Mar 2017 09:24:05 -0500 Subject: [PATCH] Remove extraneous enum_ python constructor Added in 6fb48490ef9da9ecddea0c7b6de81b2aed6c762c The second constructor can't be doing anything--the signatures are exactly the same, and so the first is always going to be the one invoked by the dispatcher. --- include/pybind11/pybind11.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 580c4ef9f..74c8c0ff6 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1143,7 +1143,6 @@ public: return m; }, return_value_policy::copy); 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("__eq__", [](const Type &value, Type *value2) { return value2 && value == *value2; }); def("__ne__", [](const Type &value, Type *value2) { return !value2 || value != *value2; });