Boost logo

Boost :

From: Petr Kocmid (pkocmid_at_[hidden])
Date: 2000-11-22 04:05:43


Hi David,

def-ing py::Constructor<void>() does not work. Using it, I got the
following:

E:\boost/development/py_cpp/init_function.h(195) : error C2440: 'type cast'
: cannot convert from 'void' to 'class
py::detail::reference_parameter<void>'
        Expressions of type void cannot be converted to other types
        E:\boost/development/py_cpp/init_function.h(190) : while compiling
class-template member function 'class py::InstanceHolderBase *__thiscall
py::Init1<class py::InstanceValueHolder<class python::Testcon,class
py::HeldInstance<class python::Te
stcon> >,void>::create_holder(class py::ExtensionInstance *,struct _object
*,struct _object *) const'
E:\boost/development/py_cpp/init_function.h(196) : error C2661:
'InstanceValueHolder<class python::Testcon,class py::HeldInstance<class
python::Testcon> >::InstanceValueHolder<class python::Testcon,class
py::HeldInstance<class python::Testcon> >' :
no overloaded function takes 2 parameters
        E:\boost/development/py_cpp/init_function.h(190) : while compiling
class-template member function 'class py::InstanceHolderBase *__thiscall
py::Init1<class py::InstanceValueHolder<class python::Testcon,class
py::HeldInstance<class python::Te
stcon> >,void>::create_holder(class py::ExtensionInstance *,struct _object
*,struct _object *) const'

Simply changing to py::Constructor<int> and using constructor taking dummy
int argument makes compiler happy.

I use msvc6.4 with no STLport this time...

BTW, I am working on embedding support on the top of py_cpp, which I feel
will be worth of adding to py_cpp (Engine with initialization/finalization,
pluggable console system, scripted C++ objects). How far is your
boostinfection progressed?

Petr Kocmid
pkocmid_at_[hidden]


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