[C++-sig] Boost converter for passing std::vector object by reference into a function??

2012-01-21 Thread DeVico, Mike
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

Re: [C++-sig] Boost converter for passing std::vector object by reference into a function??

2012-01-21 Thread Jim Bosch
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