[C++-sig] wrapper & HeldType

Scott McKay skottmckay at gmail.com
Wed Oct 12 16:35:11 CEST 2005


>
> > class_< data_wrapper, shared_ptr< data_wrapper > >(...);
> > implicitly_convertible< smart_ptr< data_wrapper >, smart_ptr< data >
> >();
>
> smart_ptr is shared_ptr right?
>

Yes it is. Sorry.

> That works for me.
>
> It doesn't work fork me. I have compile time error saying that:
>
> error C2440: 'initializing' : cannot convert from
> 'smart_pointers::data *' to 'data_wrapper *'
> Cast from base to derived requires dynamic_cast or static_cast


Are you using boost::shared_ptr or 'smart_pointers'?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20051012/9d2d0aa7/attachment.htm>


More information about the Cplusplus-sig mailing list