[C++-sig] wrapper and shared_ptr - how to combine?

Stefan Seefeld seefeld at sympatico.ca
Sat Nov 15 17:20:00 CET 2008


Leonard Ritter wrote:
>
> class_<PyActor, ActorPtr, boost::noncopyable("Actor");
>
> which I did, but that gives me a compiler error if Actor is abstract, 
> and if I declare it non-abstract, calls to wrapping PyActor methods 
> fail in Python. I guess that this approach does not work with wrapper 
> classes, or the syntax is different.
Please post specific code as well as specific error messages. It sounds 
as if you expect those methods to return references to existing (shared) 
objects, while boost.python expects by-value passing, i.e. wants to make 
copies. But without more information this is just a guess.

Regards,
       Stefan

-- 

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



More information about the Cplusplus-sig mailing list