Boost logo

Boost Users :

Subject: [Boost-users] Boost-python wrapping a vector of vectors?
From: Tim Couper (tim_at_[hidden])
Date: 2010-01-06 12:14:28


I'm trying to boost-python a vector-of-vectors, like

class A
{
public
    A(const std::vector<std::vector double >>& my_array);
};

and would intuitively write the wrapper:

BOOST_PYTHON_MODULE(foo)
{
using namespace boost::python

class_<A>("A")
     .def(init(std::vector<std::vector<double> >())
     ;

but get the error "a call to a constructor cannot appear in a constant
expression"

Can anyone supply any guidance as to how to wrap this? Thanks

Tim



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net