From e76cdab6dd77bad411e6ac9372ee527aff89ef17 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 2 Jan 2021 10:15:39 +0100 Subject: Update pybind11 to version 2.6.1 --- 3rdparty/pybind11/tests/pybind11_tests.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to '3rdparty/pybind11/tests/pybind11_tests.cpp') diff --git a/3rdparty/pybind11/tests/pybind11_tests.cpp b/3rdparty/pybind11/tests/pybind11_tests.cpp index bc7d2c3e..439cd401 100644 --- a/3rdparty/pybind11/tests/pybind11_tests.cpp +++ b/3rdparty/pybind11/tests/pybind11_tests.cpp @@ -26,23 +26,23 @@ productively. Instead, see the "How can I reduce the build time?" question in the "Frequently asked questions" section of the documentation for good practice on splitting binding code over multiple files. */ -std::list> &initializers() { - static std::list> inits; +std::list> &initializers() { + static std::list> inits; return inits; } test_initializer::test_initializer(Initializer init) { - initializers().push_back(init); + initializers().emplace_back(init); } test_initializer::test_initializer(const char *submodule_name, Initializer init) { - initializers().push_back([=](py::module &parent) { + initializers().emplace_back([=](py::module_ &parent) { auto m = parent.def_submodule(submodule_name); init(m); }); } -void bind_ConstructorStats(py::module &m) { +void bind_ConstructorStats(py::module_ &m) { py::class_(m, "ConstructorStats") .def("alive", &ConstructorStats::alive) .def("values", &ConstructorStats::values) @@ -88,6 +88,4 @@ PYBIND11_MODULE(pybind11_tests, m) { for (const auto &initializer : initializers()) initializer(m); - - if (!py::hasattr(m, "have_eigen")) m.attr("have_eigen") = false; } -- cgit v1.2.3