On 02/12/2012 01:34 PM, Guillaume Carbonneau wrote:
> Hi,
>
> I'm having compilation errors as soon as I give my classes member
> variables that come from the boost thread library.
> Wrapping those in shared_ptr seems to work.

By default, boost.python treats objects as copyable. That doesn't work
if some of your members aren't copyable themselves. You need to figure
out the semantics of your struct 'Hello'. Do you want it to be copyable,
than you need to change the definition of the non-copyable members, such
as you have done.

However, you could as well make the wrapped type non-copyable, in which
case that's not necessary.

>
> Any idea why? Is there a special wrapping directive I should give it to?

See http://www.boost.org/doc/libs/1_48_0/libs/python/doc/v2/class.html

    Stefan


-- 

      ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to