mirror of
https://github.com/boostorg/smart_ptr.git
synced 2026-04-29 02:24:15 +02:00
intrusive_ptr.hpp added (still experimental)
[SVN r13526]
This commit is contained in:
@@ -68,6 +68,7 @@ template<> struct shared_ptr_traits<void>
|
||||
//
|
||||
|
||||
template<typename T> class weak_ptr;
|
||||
template<typename T> class intrusive_ptr;
|
||||
|
||||
template<typename T> class shared_ptr
|
||||
{
|
||||
@@ -110,6 +111,11 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
template<typename Y>
|
||||
shared_ptr(intrusive_ptr<Y> const & r): px(r.get()), pn(r.get()) // never throws
|
||||
{
|
||||
}
|
||||
|
||||
template<typename Y>
|
||||
shared_ptr(shared_ptr<Y> const & r, detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user