[email protected]
[Top] [All Lists]

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

Subject: [C++-sig] Best way to register shared_ptr<const T>
From: Andrea
Date: Wed, 23 Jan 2008 20:28:56 +0000
Newsgroups: gmane.comp.python.c++

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.

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.

C++-sig mailing list

<Prev in Thread] Current Thread [Next in Thread>