We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e5f5c4 commit b33d06fCopy full SHA for b33d06f
tests/test_class.cpp
@@ -85,7 +85,7 @@ TEST_SUBMODULE(class_, m) {
85
.def_static("new_instance", &NoConstructor::new_instance, "Return an instance");
86
87
py::class_<NoConstructorNew>(m, "NoConstructorNew")
88
- .def(py::init([](const NoConstructorNew &self) { return self; })) // Need a NOOP __init__
+ .def(py::init([]() { return nullptr; })) // Need a NOOP __init__
89
.def_static("__new__",
90
[](const py::object &) { return NoConstructorNew::new_instance(); });
91
0 commit comments