[C++-sig] Boost.Python queries
Hugo van der Merwe
s13361562 at bach.sun.ac.za
Tue Jan 29 23:36:53 CET 2002
> > 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.
Sorry, it didn't ;) Somehow I must have gotten old code or something. (I
had two working copies of my work lying around, maybe I took the wrong
directory...)
So is it easy for me to push this limit up to 8? Or should I try
grouping my returned tuples like so:
( (x,y,z), (a,b), (f,g), k) ?
> > 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.
Thanks. I'll take a look.
Boost.Python truly is great to work with, thanks!
Hugo
More information about the Cplusplus-sig
mailing list