c++-sig@python.org
[Top] [All Lists]

Re: [C++-sig] Best way to register shared_ptr<const T>

Subject: Re: [C++-sig] Best way to register shared_ptr<const T>
From: "Roman Yakovenko"
Date: Thu, 24 Jan 2008 21:05:27 +0200
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/

Attachment: pointer_holder.hpp.patch
Description: Text Data

_______________________________________________
C++-sig mailing list
C++-sig@xxxxxxxxxx
http://mail.python.org/mailman/listinfo/c++-sig
<Prev in Thread] Current Thread [Next in Thread>