From 413eda943a0a9f188cf53b0b8ebd9d8a4feebc11 Mon Sep 17 00:00:00 2001 From: Andrii Verbytskyi Date: Thu, 23 May 2024 14:52:23 +0200 Subject: [PATCH] New binders --- python/src/pyHepMC3.cpp | 6 +-- python/src/pyHepMC3_0.cpp | 4 +- python/src/pyHepMC3_1.cpp | 4 +- python/src/pyHepMC3_10.cpp | 20 ++++---- python/src/pyHepMC3_11.cpp | 22 ++++----- python/src/pyHepMC3_12.cpp | 20 ++++---- python/src/pyHepMC3_13.cpp | 56 +++++++++++----------- python/src/pyHepMC3_14.cpp | 46 +++++++++--------- python/src/pyHepMC3_15.cpp | 4 +- python/src/pyHepMC3_16.cpp | 4 +- python/src/pyHepMC3_17.cpp | 4 +- python/src/pyHepMC3_18.cpp | 20 ++++---- python/src/pyHepMC3_2.cpp | 4 +- python/src/pyHepMC3_3.cpp | 4 +- python/src/pyHepMC3_4.cpp | 4 +- python/src/pyHepMC3_5.cpp | 84 ++++++++++++++++----------------- python/src/pyHepMC3_6.cpp | 76 ++++++++++++++--------------- python/src/pyHepMC3_7.cpp | 52 ++++++++++---------- python/src/pyHepMC3_8.cpp | 12 ++--- python/src/pyHepMC3_9.cpp | 12 ++--- python/src/pyHepMC3rootIO.cpp | 6 +-- python/src/pyHepMC3rootIO_0.cpp | 4 +- python/src/pyHepMC3rootIO_1.cpp | 4 +- python/src/pyHepMC3rootIO_2.cpp | 4 +- python/src/pyHepMC3search.cpp | 6 +-- python/src/pyHepMC3search_0.cpp | 4 +- 26 files changed, 243 insertions(+), 243 deletions(-) diff --git a/python/src/pyHepMC3.cpp b/python/src/pyHepMC3.cpp index ffe4a638..9b32dc43 100644 --- a/python/src/pyHepMC3.cpp +++ b/python/src/pyHepMC3.cpp @@ -7,7 +7,7 @@ #include -typedef std::function< pybind11::module & (std::string const &) > ModuleGetter; +using ModuleGetter = std::function< pybind11::module & (std::string const &) >; void bind_pyHepMC3_0(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_pyHepMC3_1(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -48,7 +48,7 @@ PYBIND11_MODULE(pyHepMC3, root_module) { auto mangle_namespace_name( [](std::string const &ns) -> std::string { if ( std::find(reserved_python_words.begin(), reserved_python_words.end(), ns) == reserved_python_words.end() ) return ns; - else return ns+'_'; + return ns+'_'; } ); @@ -57,7 +57,7 @@ PYBIND11_MODULE(pyHepMC3, root_module) { {"", "LHEF"}, {"", "std"}, }; - for(auto &p : sub_modules ) modules[p.first.size() ? p.first+"::"+p.second : p.second] = modules[p.first].def_submodule( mangle_namespace_name(p.second).c_str(), ("Bindings for " + p.first + "::" + p.second + " namespace").c_str() ); + for(auto &p : sub_modules ) modules[ p.first.empty() ? p.second : p.first+"::"+p.second ] = modules[p.first].def_submodule( mangle_namespace_name(p.second).c_str(), ("Bindings for " + p.first + "::" + p.second + " namespace").c_str() ); //pybind11::class_>(M(""), "_encapsulated_data_"); diff --git a/python/src/pyHepMC3_0.cpp b/python/src/pyHepMC3_0.cpp index e70b8a69..f29b8b6a 100644 --- a/python/src/pyHepMC3_0.cpp +++ b/python/src/pyHepMC3_0.cpp @@ -14,8 +14,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3_1.cpp b/python/src/pyHepMC3_1.cpp index 822d6040..be553914 100644 --- a/python/src/pyHepMC3_1.cpp +++ b/python/src/pyHepMC3_1.cpp @@ -14,8 +14,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3_10.cpp b/python/src/pyHepMC3_10.cpp index 310b1f2d..f443585b 100644 --- a/python/src/pyHepMC3_10.cpp +++ b/python/src/pyHepMC3_10.cpp @@ -35,8 +35,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -53,7 +53,7 @@ struct PyCallBack_HepMC3_Writer : public HepMC3::Writer { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } pybind11::pybind11_fail("Tried to call pure virtual function \"Writer::write_event\""); } @@ -66,7 +66,7 @@ struct PyCallBack_HepMC3_Writer : public HepMC3::Writer { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } pybind11::pybind11_fail("Tried to call pure virtual function \"Writer::failed\""); } @@ -79,7 +79,7 @@ struct PyCallBack_HepMC3_Writer : public HepMC3::Writer { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } pybind11::pybind11_fail("Tried to call pure virtual function \"Writer::close\""); } @@ -92,7 +92,7 @@ struct PyCallBack_HepMC3_Writer : public HepMC3::Writer { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Writer::set_run_info(a0); } @@ -105,7 +105,7 @@ struct PyCallBack_HepMC3_Writer : public HepMC3::Writer { static pybind11::detail::override_caster_t> caster; return pybind11::detail::cast_ref>(std::move(o), caster); } - else return pybind11::detail::cast_safe>(std::move(o)); + return pybind11::detail::cast_safe>(std::move(o)); } return Writer::run_info(); } @@ -118,11 +118,11 @@ struct PyCallBack_HepMC3_Writer : public HepMC3::Writer { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Writer::set_options(a0); } - using _binder_ret_0 = class std::map; + using _binder_ret_0 = std::map; _binder_ret_0 get_options() const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get_options"); @@ -132,7 +132,7 @@ struct PyCallBack_HepMC3_Writer : public HepMC3::Writer { static pybind11::detail::override_caster_t<_binder_ret_0> caster; return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); } return Writer::get_options(); } diff --git a/python/src/pyHepMC3_11.cpp b/python/src/pyHepMC3_11.cpp index 2567dcde..ac6fbe9f 100644 --- a/python/src/pyHepMC3_11.cpp +++ b/python/src/pyHepMC3_11.cpp @@ -31,8 +31,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -49,7 +49,7 @@ struct PyCallBack_HepMC3_Reader : public HepMC3::Reader { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::skip(a0); } @@ -62,7 +62,7 @@ struct PyCallBack_HepMC3_Reader : public HepMC3::Reader { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } pybind11::pybind11_fail("Tried to call pure virtual function \"Reader::read_event\""); } @@ -75,7 +75,7 @@ struct PyCallBack_HepMC3_Reader : public HepMC3::Reader { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } pybind11::pybind11_fail("Tried to call pure virtual function \"Reader::failed\""); } @@ -88,7 +88,7 @@ struct PyCallBack_HepMC3_Reader : public HepMC3::Reader { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } pybind11::pybind11_fail("Tried to call pure virtual function \"Reader::close\""); } @@ -101,7 +101,7 @@ struct PyCallBack_HepMC3_Reader : public HepMC3::Reader { static pybind11::detail::override_caster_t> caster; return pybind11::detail::cast_ref>(std::move(o), caster); } - else return pybind11::detail::cast_safe>(std::move(o)); + return pybind11::detail::cast_safe>(std::move(o)); } return Reader::run_info(); } @@ -114,11 +114,11 @@ struct PyCallBack_HepMC3_Reader : public HepMC3::Reader { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::set_options(a0); } - using _binder_ret_0 = class std::map; + using _binder_ret_0 = std::map; _binder_ret_0 get_options() const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get_options"); @@ -128,7 +128,7 @@ struct PyCallBack_HepMC3_Reader : public HepMC3::Reader { static pybind11::detail::override_caster_t<_binder_ret_0> caster; return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); } return Reader::get_options(); } @@ -141,7 +141,7 @@ struct PyCallBack_HepMC3_Reader : public HepMC3::Reader { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::set_run_info(a0); } diff --git a/python/src/pyHepMC3_12.cpp b/python/src/pyHepMC3_12.cpp index 2bbe463c..269ba12f 100644 --- a/python/src/pyHepMC3_12.cpp +++ b/python/src/pyHepMC3_12.cpp @@ -35,8 +35,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -53,7 +53,7 @@ struct PyCallBack_HepMC3_WriterAscii : public HepMC3::WriterAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterAscii::write_event(a0); } @@ -66,7 +66,7 @@ struct PyCallBack_HepMC3_WriterAscii : public HepMC3::WriterAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterAscii::failed(); } @@ -79,7 +79,7 @@ struct PyCallBack_HepMC3_WriterAscii : public HepMC3::WriterAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterAscii::close(); } @@ -92,7 +92,7 @@ struct PyCallBack_HepMC3_WriterAscii : public HepMC3::WriterAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Writer::set_run_info(a0); } @@ -105,7 +105,7 @@ struct PyCallBack_HepMC3_WriterAscii : public HepMC3::WriterAscii { static pybind11::detail::override_caster_t> caster; return pybind11::detail::cast_ref>(std::move(o), caster); } - else return pybind11::detail::cast_safe>(std::move(o)); + return pybind11::detail::cast_safe>(std::move(o)); } return Writer::run_info(); } @@ -118,11 +118,11 @@ struct PyCallBack_HepMC3_WriterAscii : public HepMC3::WriterAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Writer::set_options(a0); } - using _binder_ret_0 = class std::map; + using _binder_ret_0 = std::map; _binder_ret_0 get_options() const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get_options"); @@ -132,7 +132,7 @@ struct PyCallBack_HepMC3_WriterAscii : public HepMC3::WriterAscii { static pybind11::detail::override_caster_t<_binder_ret_0> caster; return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); } return Writer::get_options(); } diff --git a/python/src/pyHepMC3_13.cpp b/python/src/pyHepMC3_13.cpp index c0f06700..180650cb 100644 --- a/python/src/pyHepMC3_13.cpp +++ b/python/src/pyHepMC3_13.cpp @@ -39,8 +39,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -57,7 +57,7 @@ struct PyCallBack_HepMC3_ReaderAscii : public HepMC3::ReaderAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderAscii::skip(a0); } @@ -70,7 +70,7 @@ struct PyCallBack_HepMC3_ReaderAscii : public HepMC3::ReaderAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderAscii::read_event(a0); } @@ -83,7 +83,7 @@ struct PyCallBack_HepMC3_ReaderAscii : public HepMC3::ReaderAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderAscii::failed(); } @@ -96,7 +96,7 @@ struct PyCallBack_HepMC3_ReaderAscii : public HepMC3::ReaderAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderAscii::close(); } @@ -109,7 +109,7 @@ struct PyCallBack_HepMC3_ReaderAscii : public HepMC3::ReaderAscii { static pybind11::detail::override_caster_t> caster; return pybind11::detail::cast_ref>(std::move(o), caster); } - else return pybind11::detail::cast_safe>(std::move(o)); + return pybind11::detail::cast_safe>(std::move(o)); } return Reader::run_info(); } @@ -122,11 +122,11 @@ struct PyCallBack_HepMC3_ReaderAscii : public HepMC3::ReaderAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::set_options(a0); } - using _binder_ret_0 = class std::map; + using _binder_ret_0 = std::map; _binder_ret_0 get_options() const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get_options"); @@ -136,7 +136,7 @@ struct PyCallBack_HepMC3_ReaderAscii : public HepMC3::ReaderAscii { static pybind11::detail::override_caster_t<_binder_ret_0> caster; return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); } return Reader::get_options(); } @@ -149,7 +149,7 @@ struct PyCallBack_HepMC3_ReaderAscii : public HepMC3::ReaderAscii { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::set_run_info(a0); } @@ -168,7 +168,7 @@ struct PyCallBack_HepMC3_WriterAsciiHepMC2 : public HepMC3::WriterAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterAsciiHepMC2::write_event(a0); } @@ -181,7 +181,7 @@ struct PyCallBack_HepMC3_WriterAsciiHepMC2 : public HepMC3::WriterAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterAsciiHepMC2::failed(); } @@ -194,7 +194,7 @@ struct PyCallBack_HepMC3_WriterAsciiHepMC2 : public HepMC3::WriterAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterAsciiHepMC2::close(); } @@ -207,7 +207,7 @@ struct PyCallBack_HepMC3_WriterAsciiHepMC2 : public HepMC3::WriterAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Writer::set_run_info(a0); } @@ -220,7 +220,7 @@ struct PyCallBack_HepMC3_WriterAsciiHepMC2 : public HepMC3::WriterAsciiHepMC2 { static pybind11::detail::override_caster_t> caster; return pybind11::detail::cast_ref>(std::move(o), caster); } - else return pybind11::detail::cast_safe>(std::move(o)); + return pybind11::detail::cast_safe>(std::move(o)); } return Writer::run_info(); } @@ -233,11 +233,11 @@ struct PyCallBack_HepMC3_WriterAsciiHepMC2 : public HepMC3::WriterAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Writer::set_options(a0); } - using _binder_ret_0 = class std::map; + using _binder_ret_0 = std::map; _binder_ret_0 get_options() const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get_options"); @@ -247,7 +247,7 @@ struct PyCallBack_HepMC3_WriterAsciiHepMC2 : public HepMC3::WriterAsciiHepMC2 { static pybind11::detail::override_caster_t<_binder_ret_0> caster; return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); } return Writer::get_options(); } @@ -266,7 +266,7 @@ struct PyCallBack_HepMC3_ReaderAsciiHepMC2 : public HepMC3::ReaderAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderAsciiHepMC2::skip(a0); } @@ -279,7 +279,7 @@ struct PyCallBack_HepMC3_ReaderAsciiHepMC2 : public HepMC3::ReaderAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderAsciiHepMC2::read_event(a0); } @@ -292,7 +292,7 @@ struct PyCallBack_HepMC3_ReaderAsciiHepMC2 : public HepMC3::ReaderAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderAsciiHepMC2::failed(); } @@ -305,7 +305,7 @@ struct PyCallBack_HepMC3_ReaderAsciiHepMC2 : public HepMC3::ReaderAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderAsciiHepMC2::close(); } @@ -318,7 +318,7 @@ struct PyCallBack_HepMC3_ReaderAsciiHepMC2 : public HepMC3::ReaderAsciiHepMC2 { static pybind11::detail::override_caster_t> caster; return pybind11::detail::cast_ref>(std::move(o), caster); } - else return pybind11::detail::cast_safe>(std::move(o)); + return pybind11::detail::cast_safe>(std::move(o)); } return Reader::run_info(); } @@ -331,11 +331,11 @@ struct PyCallBack_HepMC3_ReaderAsciiHepMC2 : public HepMC3::ReaderAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::set_options(a0); } - using _binder_ret_0 = class std::map; + using _binder_ret_0 = std::map; _binder_ret_0 get_options() const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get_options"); @@ -345,7 +345,7 @@ struct PyCallBack_HepMC3_ReaderAsciiHepMC2 : public HepMC3::ReaderAsciiHepMC2 { static pybind11::detail::override_caster_t<_binder_ret_0> caster; return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); } return Reader::get_options(); } @@ -358,7 +358,7 @@ struct PyCallBack_HepMC3_ReaderAsciiHepMC2 : public HepMC3::ReaderAsciiHepMC2 { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::set_run_info(a0); } diff --git a/python/src/pyHepMC3_14.cpp b/python/src/pyHepMC3_14.cpp index c60f39a1..bf90a8d4 100644 --- a/python/src/pyHepMC3_14.cpp +++ b/python/src/pyHepMC3_14.cpp @@ -39,8 +39,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -57,7 +57,7 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterHEPEVT::write_hepevt_particle(a0, a1); } @@ -70,7 +70,7 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterHEPEVT::write_hepevt_event_header(); } @@ -83,7 +83,7 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterHEPEVT::write_event(a0); } @@ -96,7 +96,7 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterHEPEVT::close(); } @@ -109,7 +109,7 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return WriterHEPEVT::failed(); } @@ -122,7 +122,7 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Writer::set_run_info(a0); } @@ -135,7 +135,7 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t> caster; return pybind11::detail::cast_ref>(std::move(o), caster); } - else return pybind11::detail::cast_safe>(std::move(o)); + return pybind11::detail::cast_safe>(std::move(o)); } return Writer::run_info(); } @@ -148,11 +148,11 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Writer::set_options(a0); } - using _binder_ret_0 = class std::map; + using _binder_ret_0 = std::map; _binder_ret_0 get_options() const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get_options"); @@ -162,7 +162,7 @@ struct PyCallBack_HepMC3_WriterHEPEVT : public HepMC3::WriterHEPEVT { static pybind11::detail::override_caster_t<_binder_ret_0> caster; return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); } return Writer::get_options(); } @@ -181,7 +181,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderHEPEVT::read_hepevt_event_header(); } @@ -194,7 +194,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderHEPEVT::read_hepevt_particle(a0); } @@ -207,7 +207,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderHEPEVT::skip(a0); } @@ -220,7 +220,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderHEPEVT::read_event(a0); } @@ -233,7 +233,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderHEPEVT::close(); } @@ -246,7 +246,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ReaderHEPEVT::failed(); } @@ -259,7 +259,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t> caster; return pybind11::detail::cast_ref>(std::move(o), caster); } - else return pybind11::detail::cast_safe>(std::move(o)); + return pybind11::detail::cast_safe>(std::move(o)); } return Reader::run_info(); } @@ -272,11 +272,11 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::set_options(a0); } - using _binder_ret_0 = class std::map; + using _binder_ret_0 = std::map; _binder_ret_0 get_options() const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "get_options"); @@ -286,7 +286,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t<_binder_ret_0> caster; return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); } - else return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); } return Reader::get_options(); } @@ -299,7 +299,7 @@ struct PyCallBack_HepMC3_ReaderHEPEVT : public HepMC3::ReaderHEPEVT { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Reader::set_run_info(a0); } diff --git a/python/src/pyHepMC3_15.cpp b/python/src/pyHepMC3_15.cpp index 94c95d29..8fc6442b 100644 --- a/python/src/pyHepMC3_15.cpp +++ b/python/src/pyHepMC3_15.cpp @@ -26,8 +26,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3_16.cpp b/python/src/pyHepMC3_16.cpp index 738c9eb6..5a281293 100644 --- a/python/src/pyHepMC3_16.cpp +++ b/python/src/pyHepMC3_16.cpp @@ -21,8 +21,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3_17.cpp b/python/src/pyHepMC3_17.cpp index bc36623c..4c34f001 100644 --- a/python/src/pyHepMC3_17.cpp +++ b/python/src/pyHepMC3_17.cpp @@ -21,8 +21,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3_18.cpp b/python/src/pyHepMC3_18.cpp index 5b511d41..1c6ab28d 100644 --- a/python/src/pyHepMC3_18.cpp +++ b/python/src/pyHepMC3_18.cpp @@ -27,8 +27,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -45,7 +45,7 @@ struct PyCallBack_HepMC3_HEPRUPAttribute : public HepMC3::HEPRUPAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return HEPRUPAttribute::from_string(a0); } @@ -58,7 +58,7 @@ struct PyCallBack_HepMC3_HEPRUPAttribute : public HepMC3::HEPRUPAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return HEPRUPAttribute::to_string(a0); } @@ -71,7 +71,7 @@ struct PyCallBack_HepMC3_HEPRUPAttribute : public HepMC3::HEPRUPAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -84,7 +84,7 @@ struct PyCallBack_HepMC3_HEPRUPAttribute : public HepMC3::HEPRUPAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -103,7 +103,7 @@ struct PyCallBack_HepMC3_HEPEUPAttribute : public HepMC3::HEPEUPAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return HEPEUPAttribute::from_string(a0); } @@ -116,7 +116,7 @@ struct PyCallBack_HepMC3_HEPEUPAttribute : public HepMC3::HEPEUPAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return HEPEUPAttribute::init(); } @@ -129,7 +129,7 @@ struct PyCallBack_HepMC3_HEPEUPAttribute : public HepMC3::HEPEUPAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return HEPEUPAttribute::init(a0); } @@ -142,7 +142,7 @@ struct PyCallBack_HepMC3_HEPEUPAttribute : public HepMC3::HEPEUPAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return HEPEUPAttribute::to_string(a0); } diff --git a/python/src/pyHepMC3_2.cpp b/python/src/pyHepMC3_2.cpp index e7aee2c7..4385f396 100644 --- a/python/src/pyHepMC3_2.cpp +++ b/python/src/pyHepMC3_2.cpp @@ -13,8 +13,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3_3.cpp b/python/src/pyHepMC3_3.cpp index 7db973a1..c35b1139 100644 --- a/python/src/pyHepMC3_3.cpp +++ b/python/src/pyHepMC3_3.cpp @@ -24,8 +24,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3_4.cpp b/python/src/pyHepMC3_4.cpp index 8757dc45..f8003c7d 100644 --- a/python/src/pyHepMC3_4.cpp +++ b/python/src/pyHepMC3_4.cpp @@ -21,8 +21,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3_5.cpp b/python/src/pyHepMC3_5.cpp index 3990207f..4c71edb7 100644 --- a/python/src/pyHepMC3_5.cpp +++ b/python/src/pyHepMC3_5.cpp @@ -30,8 +30,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -48,7 +48,7 @@ struct PyCallBack_HepMC3_Attribute : public HepMC3::Attribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } pybind11::pybind11_fail("Tried to call pure virtual function \"Attribute::from_string\""); } @@ -61,7 +61,7 @@ struct PyCallBack_HepMC3_Attribute : public HepMC3::Attribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -74,7 +74,7 @@ struct PyCallBack_HepMC3_Attribute : public HepMC3::Attribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -87,7 +87,7 @@ struct PyCallBack_HepMC3_Attribute : public HepMC3::Attribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } pybind11::pybind11_fail("Tried to call pure virtual function \"Attribute::to_string\""); } @@ -106,7 +106,7 @@ struct PyCallBack_HepMC3_IntAttribute : public HepMC3::IntAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return IntAttribute::from_string(a0); } @@ -119,7 +119,7 @@ struct PyCallBack_HepMC3_IntAttribute : public HepMC3::IntAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return IntAttribute::to_string(a0); } @@ -132,7 +132,7 @@ struct PyCallBack_HepMC3_IntAttribute : public HepMC3::IntAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -145,7 +145,7 @@ struct PyCallBack_HepMC3_IntAttribute : public HepMC3::IntAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -164,7 +164,7 @@ struct PyCallBack_HepMC3_LongAttribute : public HepMC3::LongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return LongAttribute::from_string(a0); } @@ -177,7 +177,7 @@ struct PyCallBack_HepMC3_LongAttribute : public HepMC3::LongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return LongAttribute::to_string(a0); } @@ -190,7 +190,7 @@ struct PyCallBack_HepMC3_LongAttribute : public HepMC3::LongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -203,7 +203,7 @@ struct PyCallBack_HepMC3_LongAttribute : public HepMC3::LongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -222,7 +222,7 @@ struct PyCallBack_HepMC3_DoubleAttribute : public HepMC3::DoubleAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return DoubleAttribute::from_string(a0); } @@ -235,7 +235,7 @@ struct PyCallBack_HepMC3_DoubleAttribute : public HepMC3::DoubleAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return DoubleAttribute::to_string(a0); } @@ -248,7 +248,7 @@ struct PyCallBack_HepMC3_DoubleAttribute : public HepMC3::DoubleAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -261,7 +261,7 @@ struct PyCallBack_HepMC3_DoubleAttribute : public HepMC3::DoubleAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -280,7 +280,7 @@ struct PyCallBack_HepMC3_FloatAttribute : public HepMC3::FloatAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return FloatAttribute::from_string(a0); } @@ -293,7 +293,7 @@ struct PyCallBack_HepMC3_FloatAttribute : public HepMC3::FloatAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return FloatAttribute::to_string(a0); } @@ -306,7 +306,7 @@ struct PyCallBack_HepMC3_FloatAttribute : public HepMC3::FloatAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -319,7 +319,7 @@ struct PyCallBack_HepMC3_FloatAttribute : public HepMC3::FloatAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -338,7 +338,7 @@ struct PyCallBack_HepMC3_StringAttribute : public HepMC3::StringAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return StringAttribute::from_string(a0); } @@ -351,7 +351,7 @@ struct PyCallBack_HepMC3_StringAttribute : public HepMC3::StringAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return StringAttribute::to_string(a0); } @@ -364,7 +364,7 @@ struct PyCallBack_HepMC3_StringAttribute : public HepMC3::StringAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -377,7 +377,7 @@ struct PyCallBack_HepMC3_StringAttribute : public HepMC3::StringAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -396,7 +396,7 @@ struct PyCallBack_HepMC3_CharAttribute : public HepMC3::CharAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return CharAttribute::from_string(a0); } @@ -409,7 +409,7 @@ struct PyCallBack_HepMC3_CharAttribute : public HepMC3::CharAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return CharAttribute::to_string(a0); } @@ -422,7 +422,7 @@ struct PyCallBack_HepMC3_CharAttribute : public HepMC3::CharAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -435,7 +435,7 @@ struct PyCallBack_HepMC3_CharAttribute : public HepMC3::CharAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -454,7 +454,7 @@ struct PyCallBack_HepMC3_LongLongAttribute : public HepMC3::LongLongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return LongLongAttribute::from_string(a0); } @@ -467,7 +467,7 @@ struct PyCallBack_HepMC3_LongLongAttribute : public HepMC3::LongLongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return LongLongAttribute::to_string(a0); } @@ -480,7 +480,7 @@ struct PyCallBack_HepMC3_LongLongAttribute : public HepMC3::LongLongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -493,7 +493,7 @@ struct PyCallBack_HepMC3_LongLongAttribute : public HepMC3::LongLongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -512,7 +512,7 @@ struct PyCallBack_HepMC3_LongDoubleAttribute : public HepMC3::LongDoubleAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return LongDoubleAttribute::from_string(a0); } @@ -525,7 +525,7 @@ struct PyCallBack_HepMC3_LongDoubleAttribute : public HepMC3::LongDoubleAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return LongDoubleAttribute::to_string(a0); } @@ -538,7 +538,7 @@ struct PyCallBack_HepMC3_LongDoubleAttribute : public HepMC3::LongDoubleAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -551,7 +551,7 @@ struct PyCallBack_HepMC3_LongDoubleAttribute : public HepMC3::LongDoubleAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -570,7 +570,7 @@ struct PyCallBack_HepMC3_UIntAttribute : public HepMC3::UIntAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return UIntAttribute::from_string(a0); } @@ -583,7 +583,7 @@ struct PyCallBack_HepMC3_UIntAttribute : public HepMC3::UIntAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return UIntAttribute::to_string(a0); } @@ -596,7 +596,7 @@ struct PyCallBack_HepMC3_UIntAttribute : public HepMC3::UIntAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -609,7 +609,7 @@ struct PyCallBack_HepMC3_UIntAttribute : public HepMC3::UIntAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } diff --git a/python/src/pyHepMC3_6.cpp b/python/src/pyHepMC3_6.cpp index bc32529e..7c0d6250 100644 --- a/python/src/pyHepMC3_6.cpp +++ b/python/src/pyHepMC3_6.cpp @@ -25,8 +25,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -43,7 +43,7 @@ struct PyCallBack_HepMC3_ULongAttribute : public HepMC3::ULongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ULongAttribute::from_string(a0); } @@ -56,7 +56,7 @@ struct PyCallBack_HepMC3_ULongAttribute : public HepMC3::ULongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ULongAttribute::to_string(a0); } @@ -69,7 +69,7 @@ struct PyCallBack_HepMC3_ULongAttribute : public HepMC3::ULongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -82,7 +82,7 @@ struct PyCallBack_HepMC3_ULongAttribute : public HepMC3::ULongAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -101,7 +101,7 @@ struct PyCallBack_HepMC3_ULongLongAttribute : public HepMC3::ULongLongAttribute static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ULongLongAttribute::from_string(a0); } @@ -114,7 +114,7 @@ struct PyCallBack_HepMC3_ULongLongAttribute : public HepMC3::ULongLongAttribute static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return ULongLongAttribute::to_string(a0); } @@ -127,7 +127,7 @@ struct PyCallBack_HepMC3_ULongLongAttribute : public HepMC3::ULongLongAttribute static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -140,7 +140,7 @@ struct PyCallBack_HepMC3_ULongLongAttribute : public HepMC3::ULongLongAttribute static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -159,7 +159,7 @@ struct PyCallBack_HepMC3_BoolAttribute : public HepMC3::BoolAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return BoolAttribute::from_string(a0); } @@ -172,7 +172,7 @@ struct PyCallBack_HepMC3_BoolAttribute : public HepMC3::BoolAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return BoolAttribute::to_string(a0); } @@ -185,7 +185,7 @@ struct PyCallBack_HepMC3_BoolAttribute : public HepMC3::BoolAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -198,7 +198,7 @@ struct PyCallBack_HepMC3_BoolAttribute : public HepMC3::BoolAttribute { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -217,7 +217,7 @@ struct PyCallBack_HepMC3_VectorCharAttribute : public HepMC3::VectorCharAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorCharAttribute::from_string(a0); } @@ -230,7 +230,7 @@ struct PyCallBack_HepMC3_VectorCharAttribute : public HepMC3::VectorCharAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorCharAttribute::to_string(a0); } @@ -243,7 +243,7 @@ struct PyCallBack_HepMC3_VectorCharAttribute : public HepMC3::VectorCharAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -256,7 +256,7 @@ struct PyCallBack_HepMC3_VectorCharAttribute : public HepMC3::VectorCharAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -275,7 +275,7 @@ struct PyCallBack_HepMC3_VectorFloatAttribute : public HepMC3::VectorFloatAttrib static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorFloatAttribute::from_string(a0); } @@ -288,7 +288,7 @@ struct PyCallBack_HepMC3_VectorFloatAttribute : public HepMC3::VectorFloatAttrib static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorFloatAttribute::to_string(a0); } @@ -301,7 +301,7 @@ struct PyCallBack_HepMC3_VectorFloatAttribute : public HepMC3::VectorFloatAttrib static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -314,7 +314,7 @@ struct PyCallBack_HepMC3_VectorFloatAttribute : public HepMC3::VectorFloatAttrib static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -333,7 +333,7 @@ struct PyCallBack_HepMC3_VectorLongDoubleAttribute : public HepMC3::VectorLongDo static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorLongDoubleAttribute::from_string(a0); } @@ -346,7 +346,7 @@ struct PyCallBack_HepMC3_VectorLongDoubleAttribute : public HepMC3::VectorLongDo static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorLongDoubleAttribute::to_string(a0); } @@ -359,7 +359,7 @@ struct PyCallBack_HepMC3_VectorLongDoubleAttribute : public HepMC3::VectorLongDo static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -372,7 +372,7 @@ struct PyCallBack_HepMC3_VectorLongDoubleAttribute : public HepMC3::VectorLongDo static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -391,7 +391,7 @@ struct PyCallBack_HepMC3_VectorLongLongAttribute : public HepMC3::VectorLongLong static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorLongLongAttribute::from_string(a0); } @@ -404,7 +404,7 @@ struct PyCallBack_HepMC3_VectorLongLongAttribute : public HepMC3::VectorLongLong static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorLongLongAttribute::to_string(a0); } @@ -417,7 +417,7 @@ struct PyCallBack_HepMC3_VectorLongLongAttribute : public HepMC3::VectorLongLong static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -430,7 +430,7 @@ struct PyCallBack_HepMC3_VectorLongLongAttribute : public HepMC3::VectorLongLong static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -449,7 +449,7 @@ struct PyCallBack_HepMC3_VectorUIntAttribute : public HepMC3::VectorUIntAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorUIntAttribute::from_string(a0); } @@ -462,7 +462,7 @@ struct PyCallBack_HepMC3_VectorUIntAttribute : public HepMC3::VectorUIntAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorUIntAttribute::to_string(a0); } @@ -475,7 +475,7 @@ struct PyCallBack_HepMC3_VectorUIntAttribute : public HepMC3::VectorUIntAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -488,7 +488,7 @@ struct PyCallBack_HepMC3_VectorUIntAttribute : public HepMC3::VectorUIntAttribut static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -507,7 +507,7 @@ struct PyCallBack_HepMC3_VectorULongAttribute : public HepMC3::VectorULongAttrib static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorULongAttribute::from_string(a0); } @@ -520,7 +520,7 @@ struct PyCallBack_HepMC3_VectorULongAttribute : public HepMC3::VectorULongAttrib static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorULongAttribute::to_string(a0); } @@ -533,7 +533,7 @@ struct PyCallBack_HepMC3_VectorULongAttribute : public HepMC3::VectorULongAttrib static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -546,7 +546,7 @@ struct PyCallBack_HepMC3_VectorULongAttribute : public HepMC3::VectorULongAttrib static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } diff --git a/python/src/pyHepMC3_7.cpp b/python/src/pyHepMC3_7.cpp index a2b21c78..3600aa8b 100644 --- a/python/src/pyHepMC3_7.cpp +++ b/python/src/pyHepMC3_7.cpp @@ -25,8 +25,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -43,7 +43,7 @@ struct PyCallBack_HepMC3_VectorULongLongAttribute : public HepMC3::VectorULongLo static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorULongLongAttribute::from_string(a0); } @@ -56,7 +56,7 @@ struct PyCallBack_HepMC3_VectorULongLongAttribute : public HepMC3::VectorULongLo static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorULongLongAttribute::to_string(a0); } @@ -69,7 +69,7 @@ struct PyCallBack_HepMC3_VectorULongLongAttribute : public HepMC3::VectorULongLo static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -82,7 +82,7 @@ struct PyCallBack_HepMC3_VectorULongLongAttribute : public HepMC3::VectorULongLo static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -101,7 +101,7 @@ struct PyCallBack_HepMC3_VectorIntAttribute : public HepMC3::VectorIntAttribute static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorIntAttribute::from_string(a0); } @@ -114,7 +114,7 @@ struct PyCallBack_HepMC3_VectorIntAttribute : public HepMC3::VectorIntAttribute static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorIntAttribute::to_string(a0); } @@ -127,7 +127,7 @@ struct PyCallBack_HepMC3_VectorIntAttribute : public HepMC3::VectorIntAttribute static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -140,7 +140,7 @@ struct PyCallBack_HepMC3_VectorIntAttribute : public HepMC3::VectorIntAttribute static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -159,7 +159,7 @@ struct PyCallBack_HepMC3_VectorLongIntAttribute : public HepMC3::VectorLongIntAt static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorLongIntAttribute::from_string(a0); } @@ -172,7 +172,7 @@ struct PyCallBack_HepMC3_VectorLongIntAttribute : public HepMC3::VectorLongIntAt static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorLongIntAttribute::to_string(a0); } @@ -185,7 +185,7 @@ struct PyCallBack_HepMC3_VectorLongIntAttribute : public HepMC3::VectorLongIntAt static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -198,7 +198,7 @@ struct PyCallBack_HepMC3_VectorLongIntAttribute : public HepMC3::VectorLongIntAt static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -217,7 +217,7 @@ struct PyCallBack_HepMC3_VectorDoubleAttribute : public HepMC3::VectorDoubleAttr static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorDoubleAttribute::from_string(a0); } @@ -230,7 +230,7 @@ struct PyCallBack_HepMC3_VectorDoubleAttribute : public HepMC3::VectorDoubleAttr static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorDoubleAttribute::to_string(a0); } @@ -243,7 +243,7 @@ struct PyCallBack_HepMC3_VectorDoubleAttribute : public HepMC3::VectorDoubleAttr static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -256,7 +256,7 @@ struct PyCallBack_HepMC3_VectorDoubleAttribute : public HepMC3::VectorDoubleAttr static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -275,7 +275,7 @@ struct PyCallBack_HepMC3_VectorStringAttribute : public HepMC3::VectorStringAttr static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorStringAttribute::from_string(a0); } @@ -288,7 +288,7 @@ struct PyCallBack_HepMC3_VectorStringAttribute : public HepMC3::VectorStringAttr static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return VectorStringAttribute::to_string(a0); } @@ -301,7 +301,7 @@ struct PyCallBack_HepMC3_VectorStringAttribute : public HepMC3::VectorStringAttr static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -314,7 +314,7 @@ struct PyCallBack_HepMC3_VectorStringAttribute : public HepMC3::VectorStringAttr static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } @@ -333,7 +333,7 @@ struct PyCallBack_HepMC3_GenHeavyIon : public HepMC3::GenHeavyIon { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return GenHeavyIon::from_string(a0); } @@ -346,7 +346,7 @@ struct PyCallBack_HepMC3_GenHeavyIon : public HepMC3::GenHeavyIon { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return GenHeavyIon::to_string(a0); } @@ -359,7 +359,7 @@ struct PyCallBack_HepMC3_GenHeavyIon : public HepMC3::GenHeavyIon { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -372,7 +372,7 @@ struct PyCallBack_HepMC3_GenHeavyIon : public HepMC3::GenHeavyIon { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } diff --git a/python/src/pyHepMC3_8.cpp b/python/src/pyHepMC3_8.cpp index f4913553..5cc9d2f6 100644 --- a/python/src/pyHepMC3_8.cpp +++ b/python/src/pyHepMC3_8.cpp @@ -25,8 +25,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -43,7 +43,7 @@ struct PyCallBack_HepMC3_GenCrossSection : public HepMC3::GenCrossSection { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return GenCrossSection::from_string(a0); } @@ -56,7 +56,7 @@ struct PyCallBack_HepMC3_GenCrossSection : public HepMC3::GenCrossSection { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return GenCrossSection::to_string(a0); } @@ -69,7 +69,7 @@ struct PyCallBack_HepMC3_GenCrossSection : public HepMC3::GenCrossSection { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -82,7 +82,7 @@ struct PyCallBack_HepMC3_GenCrossSection : public HepMC3::GenCrossSection { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } diff --git a/python/src/pyHepMC3_9.cpp b/python/src/pyHepMC3_9.cpp index 36166f5d..cf70e260 100644 --- a/python/src/pyHepMC3_9.cpp +++ b/python/src/pyHepMC3_9.cpp @@ -31,8 +31,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif @@ -49,7 +49,7 @@ struct PyCallBack_HepMC3_GenPdfInfo : public HepMC3::GenPdfInfo { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return GenPdfInfo::from_string(a0); } @@ -62,7 +62,7 @@ struct PyCallBack_HepMC3_GenPdfInfo : public HepMC3::GenPdfInfo { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return GenPdfInfo::to_string(a0); } @@ -75,7 +75,7 @@ struct PyCallBack_HepMC3_GenPdfInfo : public HepMC3::GenPdfInfo { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(); } @@ -88,7 +88,7 @@ struct PyCallBack_HepMC3_GenPdfInfo : public HepMC3::GenPdfInfo { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } - else return pybind11::detail::cast_safe(std::move(o)); + return pybind11::detail::cast_safe(std::move(o)); } return Attribute::init(a0); } diff --git a/python/src/pyHepMC3rootIO.cpp b/python/src/pyHepMC3rootIO.cpp index 936ea637..1f34404d 100644 --- a/python/src/pyHepMC3rootIO.cpp +++ b/python/src/pyHepMC3rootIO.cpp @@ -7,7 +7,7 @@ #include -typedef std::function< pybind11::module & (std::string const &) > ModuleGetter; +using ModuleGetter = std::function< pybind11::module & (std::string const &) >; void bind_pyHepMC3rootIO_0(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_pyHepMC3rootIO_1(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -31,14 +31,14 @@ PYBIND11_MODULE(pyHepMC3rootIO, root_module) { auto mangle_namespace_name( [](std::string const &ns) -> std::string { if ( std::find(reserved_python_words.begin(), reserved_python_words.end(), ns) == reserved_python_words.end() ) return ns; - else return ns+'_'; + return ns+'_'; } ); std::vector< std::pair > sub_modules { {"", "HepMC3"}, }; - for(auto &p : sub_modules ) modules[p.first.size() ? p.first+"::"+p.second : p.second] = modules[p.first].def_submodule( mangle_namespace_name(p.second).c_str(), ("Bindings for " + p.first + "::" + p.second + " namespace").c_str() ); + for(auto &p : sub_modules ) modules[ p.first.empty() ? p.second : p.first+"::"+p.second ] = modules[p.first].def_submodule( mangle_namespace_name(p.second).c_str(), ("Bindings for " + p.first + "::" + p.second + " namespace").c_str() ); //pybind11::class_>(M(""), "_encapsulated_data_"); diff --git a/python/src/pyHepMC3rootIO_0.cpp b/python/src/pyHepMC3rootIO_0.cpp index e5068334..072f6589 100644 --- a/python/src/pyHepMC3rootIO_0.cpp +++ b/python/src/pyHepMC3rootIO_0.cpp @@ -25,8 +25,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3rootIO_1.cpp b/python/src/pyHepMC3rootIO_1.cpp index 4b52fa57..9bf4ebc6 100644 --- a/python/src/pyHepMC3rootIO_1.cpp +++ b/python/src/pyHepMC3rootIO_1.cpp @@ -26,8 +26,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3rootIO_2.cpp b/python/src/pyHepMC3rootIO_2.cpp index 5e00afd9..abaf7d96 100644 --- a/python/src/pyHepMC3rootIO_2.cpp +++ b/python/src/pyHepMC3rootIO_2.cpp @@ -25,8 +25,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif diff --git a/python/src/pyHepMC3search.cpp b/python/src/pyHepMC3search.cpp index 5e61b523..7a34664c 100644 --- a/python/src/pyHepMC3search.cpp +++ b/python/src/pyHepMC3search.cpp @@ -7,7 +7,7 @@ #include -typedef std::function< pybind11::module & (std::string const &) > ModuleGetter; +using ModuleGetter = std::function< pybind11::module & (std::string const &) >; void bind_pyHepMC3search_0(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -29,14 +29,14 @@ PYBIND11_MODULE(pyHepMC3search, root_module) { auto mangle_namespace_name( [](std::string const &ns) -> std::string { if ( std::find(reserved_python_words.begin(), reserved_python_words.end(), ns) == reserved_python_words.end() ) return ns; - else return ns+'_'; + return ns+'_'; } ); std::vector< std::pair > sub_modules { {"", "HepMC3"}, }; - for(auto &p : sub_modules ) modules[p.first.size() ? p.first+"::"+p.second : p.second] = modules[p.first].def_submodule( mangle_namespace_name(p.second).c_str(), ("Bindings for " + p.first + "::" + p.second + " namespace").c_str() ); + for(auto &p : sub_modules ) modules[ p.first.empty() ? p.second : p.first+"::"+p.second ] = modules[p.first].def_submodule( mangle_namespace_name(p.second).c_str(), ("Bindings for " + p.first + "::" + p.second + " namespace").c_str() ); //pybind11::class_>(M(""), "_encapsulated_data_"); diff --git a/python/src/pyHepMC3search_0.cpp b/python/src/pyHepMC3search_0.cpp index 754eed61..90968420 100644 --- a/python/src/pyHepMC3search_0.cpp +++ b/python/src/pyHepMC3search_0.cpp @@ -19,8 +19,8 @@ #ifndef BINDER_PYBIND11_TYPE_CASTER #define BINDER_PYBIND11_TYPE_CASTER - PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) - PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif