Hi there,
I've just started using Boost::Python. I was following the example given in the 
tutorial regarding iterators at
http://www.boost.org/doc/libs/1_52_0/libs/python/doc/tutorial/doc/html/python/iterators.html
I am attempting to fill a python::list from an std::vector with the following 
code, based on the snippet in the tutorial above:
namespace py = boost::python;
std::vector<int> v;v.push_back(1);
 py::object get_iterator = py::iterator<std::vector<int> >(); py::object iter = 
get_iterator(v); py::list l(iter); However the line "py::object iter = 
get_iter(v);" throws the following exception in python :
TypeError: No to_python (by-value) converter found for C++ type: class 
std::vector<int,class std::allocator<int> >
Any help would be appreciated.
Thanks,Andrew.
-----------------------------

Andrew Marshall

http://www.planetmarshall.co.uk
                                          
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to