shared_ptr::lock no longer requires exceptions.

[SVN r44344]
This commit is contained in:
Peter Dimov
2008-04-12 14:27:22 +00:00
parent dbd62686a3
commit f85a1bf406
3 changed files with 29 additions and 25 deletions
+9
View File
@@ -220,6 +220,15 @@ public:
px = r.px;
}
template<class Y>
shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) // never throws
{
if( !pn.empty() )
{
px = r.px;
}
}
template<class Y>
shared_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
{