[C++-sig] Boost.Python queries
David Abrahams
david.abrahams at rcn.com
Tue Jan 29 13:58:22 CET 2002
----- Original Message -----
From: "Hugo van der Merwe" <s13361562 at bach.sun.ac.za>
> I have the following error:
>
> demeter.cpp:134: no matching function for call to
`boost::python::tuple::tuple (float &, float &, float &, int &, int &, float
&, float &, bool &)'
>
> I typecast the last bool to an int when passing to tuple, that solved
> it. Am I pushing internal but arbitrary limits of Boost again?
Well, I guess so, but: there's no 8-argument constructor to tuple as far as
I know, so it's hard to imagine why this would work.
> Exceptions: I checked the examples - they show nicely how to raise an
> exception in your wrapper code. Is there a way to have exceptions that
> are raised in the wrapped code automatically converted though?
Not yet. You can derive your exceptions from std::exception, as described in
http://groups.yahoo.com/group/boost/message/17910, but that doesn't produce
very nice results.
> (Otherwise one would have to write an exception-converting thin wrapper
> for each method.) Is there not some way one could e.g. "install" a
> "default exception converting wrapper" automatically?
That's in the plan.
> (Some way it can
> be included in V2?)
Yes. See http://www.python.org/sigs/c++-sig
More information about the Cplusplus-sig
mailing list