How to use SWIG to wrap std::function objects?
问题 I have seen quite a few similar questions, but have not found a solution to my particular problem. I am attempting to SWIGify some C++11 code that uses std::function, so I can use it in my Java application. I have encountered shared pointers like this: virtual std::shared_ptr<some::ns::TheThing> getTheThing(unsigned short thingID); and successfully handled them with the shared_ptr directive like so: %shared_ptr(some::ns::TheThing); I have encountered vectors of shared pointers like this: