[C++-sig] std::tr1::shared_ptr as boost::shared_ptr
roman.yakovenko at gmail.com
Fri Apr 20 19:26:43 CEST 2007
On 4/20/07, Piotr Jaroszynski <p.jaroszynski at gmail.com> wrote:
> On Friday 20 of April 2007 18:53:32 Roman Yakovenko wrote:
> > There is no implicit conversion from a base class to the dervied.
> > The other way will work:
> > bp::implicitly_convertible<std::tr1::shared_ptr<Derived>,
> > std::tr1::shared_ptr<Foo> >();
> Err I made a "typo", that's what I meant as a work around. What I asked
> was whether it's possible to make it work exactly as with
> func(std::tr1::shared_ptr<Foo>) ...
> bp::class_<Foo> ...
> bp::class_<Derived, bp::bases<Foo> > ...
> and func can take both Foo and Derived.
> I suppose it's a matter of making some "mirror" templates for
> std::tr1::shared_ptr so boost.python will treat it exactly as it treats
I am not sure. What you can do is to search Boost.Python library for
C++ Python language binding
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cplusplus-sig