3

I am playing with boost.python and I have the following question:

in python I have a list of lists:

l = [[1, 2, 3], [4, 5, 6]]

I have a c++ function like:

void do(std::vector<std::vector<int>> v);

Obviously I cannot pass l to the above function.

How I can pass a list of list to a function as above?

gosom
  • 1,299
  • 3
  • 16
  • 35
  • 2
    This [answer](http://stackoverflow.com/a/15940413/1053968) demonstrates using custom converters to convert iterable Python objects into C++ sequences. – Tanner Sansbury Jan 05 '15 at 03:42
  • Possible duplicate of [Feeding a Python list into a function taking in a vector with Boost Python](http://stackoverflow.com/questions/15842126/feeding-a-python-list-into-a-function-taking-in-a-vector-with-boost-python) – cromod Apr 30 '16 at 20:48

0 Answers0