EDIT: Solved, my mistake; explained in my answer.
I have this:
std::vector < boost::shared_ptr < Entity > > entities;
and I try to expose it through SWIG like this:
%include "boost_shared_ptr.i"
%include "std_vector.i"
%shared_ptr(Entity)
%include <Entity.h>
namespace std {
%template(EntityVector) vector<boost::shared_ptr<Entity> >;
};
%include <TheFileWithEntities.h>
However, in Python entities ends up being a tuple:
import MyModule
print type(MyModule.cvar.entities)
# Output: (type 'tuple')
I've Googled for this, but could not find any concrete examples on how to wrap this. One page gave a small example for wrapping it for C#, but it didn't help in my case.
Any help is greatly appreciated.