Closed MasterBe closed 2 months ago
Hello,
I am trying to expose std::shared_ptr<const Foo> and especially in my case I need std::vector<std::shared_ptr<const Foo>>. I tried:
std::shared_ptr<const Foo>
std::vector<std::shared_ptr<const Foo>>
boost::python::implicitly_convertible<std::shared_ptr<Foo>,std::shared_ptr<const Foo>>();
boost::python::register_ptr_to_python<std::shared_ptr<const Foo>>();
Both 1 and 2 don't work in jupyter notebook getting error: TypeError: No to_python (by-value) converter found for C++ type. Could you please advise on how to achieve this.
TypeError: No to_python (by-value) converter found for C++ type
Hello,
I am trying to expose
std::shared_ptr<const Foo>
and especially in my case I needstd::vector<std::shared_ptr<const Foo>>
. I tried:boost::python::implicitly_convertible<std::shared_ptr<Foo>,std::shared_ptr<const Foo>>();
boost::python::register_ptr_to_python<std::shared_ptr<const Foo>>();
Both 1 and 2 don't work in jupyter notebook getting error:
TypeError: No to_python (by-value) converter found for C++ type
. Could you please advise on how to achieve this.