Hello,
I would like to wrap a class that looks like below (taken from an example I
found on another site)
#include
#include
#include
typedef std::vector MyList;
class MyClass {
public:
MyList myFuncGet()
{
return MyList();
}
void myFuncSet(MyList& list)
{
list.push_back("H
Your Boost.Python usage is fine. It's the Python code that inherently
won't work:
>> from MyModule import *
>> mc = MyClass()
>> p = []
>> mc.myFuncSet(p)
Here, 'p' doesn't actually have a std::vector in it - it's a regular
Python list, so Boost.Python can't get a std::vector reference out of