Using Boost Python & std::shared_ptr

前端 未结 4 2130
悲哀的现实
悲哀的现实 2021-02-13 06:30

I\'m trying to get Boost Python to play nicely with std::shared_ptr. Currently, I\'m receiving this error:

Traceback (most recent call last):
  File \"test.py\",         


        
4条回答
  •  臣服心动
    2021-02-13 06:47

    Unless I've misunderstood, I think this solves your problem:

    boost::python::register_ptr_to_python>();
    

    http://www.boost.org/doc/libs/1_57_0/libs/python/doc/v2/register_ptr_to_python.html

提交回复
热议问题