From fbe4fffecde9095a099db8922e313087b4a45aee Mon Sep 17 00:00:00 2001 From: hrocho Date: Sun, 29 Nov 2020 13:49:39 +0100 Subject: [PATCH] python add overload fix --- pymodule/pycatima.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pymodule/pycatima.cpp b/pymodule/pycatima.cpp index 2759488..539f30b 100644 --- a/pymodule/pycatima.cpp +++ b/pymodule/pycatima.cpp @@ -146,7 +146,8 @@ PYBIND11_MODULE(pycatima,m){ py::class_(m,"Layers") .def(py::init<>(),"constructor") - .def("add",&Layers::add) + .def("add",py::overload_cast(&Layers::add)) + .def("add_layers",py::overload_cast(&Layers::add)) .def("num",&Layers::num) // .def("__getitem__",&Layers::operator[], py::is_operator()) .def("__getitem__",[](Layers &r, int i)->Material*