$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [Python] Handling std::vector and boost::tuple
From: Johan Råde (johan.rade_at_[hidden])
Date: 2011-07-15 11:53:19
The following code fails with the error message:
"Boost.Python.ArgumentError: Python argument types in m.f(list) did not
match C++ signature: ..."
How do I make it work? Do I have to write a custom translator?
C++:
void f(const vector<tuple<double, string, bool> >& x);
BOOST_PYTHON_MODULE(m)
{
def("f", &f);
}
Python:
import m
m.f([(4.3, 'abc', True)])
Thank you,
Johan Råde