On Sat, Feb 4, 2012 at 10:46 AM, Jim Bosch <tallji...@gmail.com> wrote:

> If I understand your intend correctly, I think your class_ definition
> needs to be:
>
> class_<Communicable,shared_**ptr<CommunicableWrapper>,**noncopyable>
>
> (right now you have class_<CommunicableWrapper,...**>)
>
>
>
Something like this?

class_<Communicatable, boost::shared_ptr<CommunicatableWrapper>,
boost::noncopyable>("Communicatable")

I get burnt by the compiler when I try that:

d:\coding\boost_1_47_0\boost\python\object\pointer_holder.hpp(217): error
C2664: 'CommunicatableWrapper::CommunicatableWrapper(const
CommunicatableWrapper &)' : cannot convert parameter 1 from 'PyObject *' to
'const CommunicatableWrapper &'
          Reason: cannot convert from 'PyObject *' to 'const
CommunicatableWrapper'
          No constructor could take the source type, or constructor
overload resolution was ambiguous

It sounds like if I had a constructor that would take a PyObject *, that
would shut it up, but I have no idea what to make of such a thing.
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to