[C++-sig] How to manage smart pointer as return value of a factory?

Roman Yakovenko roman.yakovenko at gmail.com
Wed Feb 15 14:46:02 CET 2006

On 2/15/06, Julien <swell at netcourrier.com> wrote:
> Hi
> I did the change according to Mathieu's reply and the code compiles ( good
> news !) but when i try to use it in python i have this message . Does any1
> have an idea ?
> y = hello.FactY.create()
> TypeError: No to_python (by-value) converter found for C++ type: class
> std::auto_ptr<struct X>

register_ptr_to_python< std::auto_ptr< X > >();

I attached file that contains code, that has been generated by
pyplusplus for your case.

> Thx

Roman Yakovenko
C++ Python language binding
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x.h
Type: text/x-chdr
Size: 1864 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060215/258c37fa/attachment.h>

More information about the Cplusplus-sig mailing list