On Jan 23, 2008 10:28 PM, Andrea <mariofutire@xxxxxxxxxxxxxx> wrote:
> Hi,
>
> I've run into the problem of registering a shared_ptr<const T>.
> I've found a workaround using a const_cast in get_pointer.
>
> I've also read that there exist a patch to implement a proper fix.
>
> Unfortunately I cannot find more details on that.
Read this thread:
http://mail.python.org/pipermail/c++-sig/2006-November/011664.html
> Could someone please quick list pros and cons of both approaches.
> I am a bit uncomfortable about const_casting, but I cannot understand if it
> is just a way to please
> the compiler or something deeper.
I attach the original patch
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
pointer_holder.hpp.patch
Description: Text Data
_______________________________________________
C++-sig mailing list
C++-sig@xxxxxxxxxx
http://mail.python.org/mailman/listinfo/c++-sig
|