[C++-sig] wrapper & HeldType
David Abrahams
dave at boost-consulting.com
Wed Oct 12 13:48:26 CEST 2005
Roman Yakovenko <roman.yakovenko at gmail.com> writes:
> Hi. I think I found bug in treatment of held type.
> Consider next code:
>
> struct data{
> virtual int f();
> }
>
> There are 2 way to "override" f in Python.
> The first one is:
> struct data_wrapper : data, wrapper<data>{...}
>
> And the second one:
>
> struct data_wrapper : data{
> data_wrapper( PyObject* self,...)
>
> private:
> PyObject* m_self;
> }
>
> The problem is that if I want HeldType to be smart pointer, in my
> specific case is shared_ptr, then I can not use the first way as is.
Could you please post a minimal, complete example that you think
should work?
Thanks,
Dave
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list