
27 Apr
2008
27 Apr
'08
2:46 a.m.
Hello I have some trouble with handling c++-container. I have these code: typedef struct foo { typedef std::vector<double> pt_coords; typedef std::vector<pt_coords> pt_list; }; foo return_foo(); Now I want to wrap these, but I don't know how! I have test this, but I think it's wrong: BOOST_PYTHON_MODULE(...) { implicitly_convertible<foo::pt_coords,tuple>(); implicitly_convertible<foo::pt_list,list>(); } By using this in Python I get: TypeError: No Python class registered for C++ class std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > How to do this right? Greetings