Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2001-08-14 02:42:33


--- In boost_at_y..., "max" <wankuang_at_h...> wrote:
> *************comprehensive.cpp*************
> KCC -I/home/wan/boost -I/home/wan/Python/include/python2.1 -g -c
> comprehensive.cpp
> "comprehensive.cpp", line 705: error: more than one instance of
> overloaded
> function "pow" matches the argument list:
> function "pow(float, int)"
> function "pow(double, int)"
> function "pow(long double, int)"
> argument types are: (const int, const int)
> Int pow(Int const & l, Int const & r) { return
> Int(static_cast<int>(::pow(l.i_, r.i_))); }

This could probably be fixed with an overload similar to that
at the top of comprehensive.cpp (line 21). Maybe it is sufficient
to modify the #ifdef.

> ********abstract.cpp*******************
> KCC -I/home/wan/boost -I/home/wan/Python/include/python2.1
> --restrict --one_per -g +K3 -O2 -c abstract.cpp
> KCC -shared classes.o conversions.o extension_class.o functions.o
> init_function.o module_builder.o objects.o types.o cross_module.o
> abstract.o -o abstract.so
> Recompiling extension_class.o
> "/home/wan/boost/boost/python/detail/extension_class.hpp", line 362:
> error:
> identifier "py_extension_class_converters" is undefined
> return
> py_extension_class_converters(boost::python::type<T>()).to_python
(x);

This, I am afraid, is a known problem which took even the
world's experts several days to figure out: the friend
function trick used by Boost.Python is not portable (i.e.
it is not standard compliant). See:
    http://cci.lbl.gov/~rwgk/boost.python/projects.html
We have worked out some preliminary code to replace the
friend function converters (which requires partial ordering),
but currently I do not have the time to pursue this. I am happy
to share the preliminary code if someone wants to take a stab.

Ralf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk