
26 Apr
2008
26 Apr
'08
7:32 p.m.
On Saturday 26 April 2008 09:48, Peter Dimov wrote:
This ease with which one might inject subtle failures in remote code (such as Boost.Python, incidentally) makes me think that sp_accept_owner is a bit too dangerous. Maybe its shared_ptr argument needs to be made const. This would break the new constructorful esft though.
Users can already define their sp_accept_owner to take a const argument, and could be encouraged to do so by the documentation. And if we did a const_cast of "this" to make it const before passing it to sp_accept_owner, a determined user could just as easily reverse it with another const_cast. -- Frank