Commit 459f9f82 by Paolo Carlini Committed by Paolo Carlini

boost_shared_ptr.h: Trivial formatting fixes.

2006-09-22  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/boost_shared_ptr.h: Trivial formatting fixes.

From-SVN: r117145
parent 53e3e587
2006-09-22 Paolo Carlini <pcarlini@suse.de>
* include/tr1/boost_shared_ptr.h: Trivial formatting fixes.
2006-09-21 Benjamin Kosnik <bkoz@redhat.com> 2006-09-21 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/type_traits.h (__numeric_traits_integer): New. * include/ext/type_traits.h (__numeric_traits_integer): New.
......
...@@ -58,31 +58,32 @@ namespace std ...@@ -58,31 +58,32 @@ namespace std
{ {
_GLIBCXX_BEGIN_NAMESPACE(tr1) _GLIBCXX_BEGIN_NAMESPACE(tr1)
class bad_weak_ptr : public std::exception class bad_weak_ptr : public std::exception
{ {
public: public:
virtual char const* virtual char const*
what() const throw() { return "tr1::bad_weak_ptr"; } what() const throw()
}; { return "tr1::bad_weak_ptr"; }
};
// Substitute for bad_weak_ptr object in the case of -fno-exceptions. // Substitute for bad_weak_ptr object in the case of -fno-exceptions.
inline void inline void
__throw_bad_weak_ptr() __throw_bad_weak_ptr()
{ {
#if __EXCEPTIONS #if __EXCEPTIONS
throw bad_weak_ptr(); throw bad_weak_ptr();
#else #else
std::abort(); std::abort();
#endif #endif
} }
using __gnu_cxx::_Lock_policy; using __gnu_cxx::_Lock_policy;
using __gnu_cxx::__default_lock_policy; using __gnu_cxx::__default_lock_policy;
using __gnu_cxx::_S_single; using __gnu_cxx::_S_single;
using __gnu_cxx::_S_mutex; using __gnu_cxx::_S_mutex;
using __gnu_cxx::_S_atomic; using __gnu_cxx::_S_atomic;
template<typename _Tp> template<typename _Tp>
struct _Sp_deleter struct _Sp_deleter
{ {
typedef void result_type; typedef void result_type;
...@@ -93,17 +94,16 @@ template<typename _Tp> ...@@ -93,17 +94,16 @@ template<typename _Tp>
{ delete p; } { delete p; }
}; };
// Empty helper class except when the template argument is _S_mutex. // Empty helper class except when the template argument is _S_mutex.
template<_Lock_policy _Lp> template<_Lock_policy _Lp>
class _Mutex_base class _Mutex_base
{ }; { };
template<> template<>
class _Mutex_base<_S_mutex> : public __gnu_cxx::__mutex class _Mutex_base<_S_mutex> : public __gnu_cxx::__mutex
{ }; { };
template<_Lock_policy _Lp = __default_lock_policy>
template<_Lock_policy _Lp = __default_lock_policy>
class _Sp_counted_base : public _Mutex_base<_Lp> class _Sp_counted_base : public _Mutex_base<_Lp>
{ {
public: public:
...@@ -139,10 +139,10 @@ template<_Lock_policy _Lp = __default_lock_policy> ...@@ -139,10 +139,10 @@ template<_Lock_policy _Lp = __default_lock_policy>
if (__gnu_cxx::__exchange_and_add(&_M_use_count, -1) == 1) if (__gnu_cxx::__exchange_and_add(&_M_use_count, -1) == 1)
{ {
dispose(); dispose();
#ifdef __GTHREADS #ifdef __GTHREADS
_GLIBCXX_READ_MEM_BARRIER; _GLIBCXX_READ_MEM_BARRIER;
_GLIBCXX_WRITE_MEM_BARRIER; _GLIBCXX_WRITE_MEM_BARRIER;
#endif #endif
if (__gnu_cxx::__exchange_and_add(&_M_weak_count, -1) == 1) if (__gnu_cxx::__exchange_and_add(&_M_weak_count, -1) == 1)
destroy(); destroy();
} }
...@@ -177,7 +177,7 @@ template<_Lock_policy _Lp = __default_lock_policy> ...@@ -177,7 +177,7 @@ template<_Lock_policy _Lp = __default_lock_policy>
_Atomic_word _M_weak_count; // #weak + (#shared != 0) _Atomic_word _M_weak_count; // #weak + (#shared != 0)
}; };
template<> template<>
inline void inline void
_Sp_counted_base<_S_single>::add_ref_lock() _Sp_counted_base<_S_single>::add_ref_lock()
{ {
...@@ -189,7 +189,7 @@ template<> ...@@ -189,7 +189,7 @@ template<>
} }
#ifdef __GTHREADS #ifdef __GTHREADS
template<> template<>
inline void inline void
_Sp_counted_base<_S_mutex>::add_ref_lock() _Sp_counted_base<_S_mutex>::add_ref_lock()
{ {
...@@ -202,7 +202,7 @@ template<> ...@@ -202,7 +202,7 @@ template<>
} }
#endif #endif
template<> template<>
inline void inline void
_Sp_counted_base<_S_atomic>::add_ref_lock() _Sp_counted_base<_S_atomic>::add_ref_lock()
{ {
...@@ -217,10 +217,11 @@ template<> ...@@ -217,10 +217,11 @@ template<>
// Replace the current counter value with the old value + 1, as // Replace the current counter value with the old value + 1, as
// long as it's not changed meanwhile. // long as it's not changed meanwhile.
} }
while (!__sync_bool_compare_and_swap(&_M_use_count, __count, __count + 1)); while (!__sync_bool_compare_and_swap(&_M_use_count, __count,
__count + 1));
} }
template<typename _Ptr, typename _Deleter, _Lock_policy _Lp> template<typename _Ptr, typename _Deleter, _Lock_policy _Lp>
class _Sp_counted_base_impl : public _Sp_counted_base<_Lp> class _Sp_counted_base_impl : public _Sp_counted_base<_Lp>
{ {
public: public:
...@@ -247,10 +248,10 @@ template<typename _Ptr, typename _Deleter, _Lock_policy _Lp> ...@@ -247,10 +248,10 @@ template<typename _Ptr, typename _Deleter, _Lock_policy _Lp>
_Deleter _M_del; // copy constructor must not throw _Deleter _M_del; // copy constructor must not throw
}; };
template<_Lock_policy _Lp = __default_lock_policy> template<_Lock_policy _Lp = __default_lock_policy>
class weak_count; class weak_count;
template<_Lock_policy _Lp = __default_lock_policy> template<_Lock_policy _Lp = __default_lock_policy>
class shared_count class shared_count
{ {
private: private:
...@@ -278,7 +279,8 @@ template<_Lock_policy _Lp = __default_lock_policy> ...@@ -278,7 +279,8 @@ template<_Lock_policy _Lp = __default_lock_policy>
// Special case for auto_ptr<_Tp> to provide the strong guarantee. // Special case for auto_ptr<_Tp> to provide the strong guarantee.
template<typename _Tp> template<typename _Tp>
explicit shared_count(std::auto_ptr<_Tp>& __r) explicit
shared_count(std::auto_ptr<_Tp>& __r)
: _M_pi(new _Sp_counted_base_impl<_Tp*, : _M_pi(new _Sp_counted_base_impl<_Tp*,
_Sp_deleter<_Tp>, _Lp >(__r.get(), _Sp_deleter<_Tp>())) _Sp_deleter<_Tp>, _Lp >(__r.get(), _Sp_deleter<_Tp>()))
{ __r.release(); } { __r.release(); }
...@@ -314,7 +316,8 @@ template<_Lock_policy _Lp = __default_lock_policy> ...@@ -314,7 +316,8 @@ template<_Lock_policy _Lp = __default_lock_policy>
return *this; return *this;
} }
void swap(shared_count& __r) // nothrow void
swap(shared_count& __r) // nothrow
{ {
_Sp_counted_base<_Lp>* __tmp = __r._M_pi; _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
__r._M_pi = _M_pi; __r._M_pi = _M_pi;
...@@ -342,7 +345,7 @@ template<_Lock_policy _Lp = __default_lock_policy> ...@@ -342,7 +345,7 @@ template<_Lock_policy _Lp = __default_lock_policy>
{ return _M_pi ? _M_pi->get_deleter(__ti) : 0; } { return _M_pi ? _M_pi->get_deleter(__ti) : 0; }
}; };
template<_Lock_policy _Lp> template<_Lock_policy _Lp>
class weak_count class weak_count
{ {
private: private:
...@@ -420,9 +423,10 @@ template<_Lock_policy _Lp> ...@@ -420,9 +423,10 @@ template<_Lock_policy _Lp>
{ return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); } { return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); }
}; };
template<_Lock_policy _Lp> template<_Lock_policy _Lp>
inline inline
shared_count<_Lp>::shared_count(const weak_count<_Lp>& __r) shared_count<_Lp>::
shared_count(const weak_count<_Lp>& __r)
: _M_pi(__r._M_pi) : _M_pi(__r._M_pi)
{ {
if (_M_pi != 0) if (_M_pi != 0)
...@@ -432,68 +436,68 @@ template<_Lock_policy _Lp> ...@@ -432,68 +436,68 @@ template<_Lock_policy _Lp>
} }
// Forward decls. // Forward decls.
template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
class __shared_ptr; class __shared_ptr;
template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
class __weak_ptr; class __weak_ptr;
template<typename _Tp, _Lock_policy _Lp> template<typename _Tp, _Lock_policy _Lp>
class __enable_shared_from_this; class __enable_shared_from_this;
struct __static_cast_tag { }; struct __static_cast_tag { };
struct __const_cast_tag { }; struct __const_cast_tag { };
struct __dynamic_cast_tag { }; struct __dynamic_cast_tag { };
struct __polymorphic_cast_tag { }; struct __polymorphic_cast_tag { };
template<class _Tp> template<class _Tp>
struct shared_ptr_traits struct __shared_ptr_reference
{ typedef _Tp& reference; }; { typedef _Tp& __type; };
template<> template<>
struct shared_ptr_traits<void> struct __shared_ptr_reference<void>
{ typedef void reference; }; { typedef void __type; };
template<> template<>
struct shared_ptr_traits<void const> struct __shared_ptr_reference<void const>
{ typedef void reference; }; { typedef void __type; };
template<> template<>
struct shared_ptr_traits<void volatile> struct __shared_ptr_reference<void volatile>
{ typedef void reference; }; { typedef void __type; };
template<> template<>
struct shared_ptr_traits<void const volatile> struct __shared_ptr_reference<void const volatile>
{ typedef void reference; }; { typedef void __type; };
// Support for enable_shared_from_this. // Support for enable_shared_from_this.
// Friend of __enable_shared_from_this. // Friend of __enable_shared_from_this.
template<_Lock_policy _Lp, typename _Tp1, typename _Tp2> template<_Lock_policy _Lp, typename _Tp1, typename _Tp2>
void void
__enable_shared_from_this_helper(const shared_count<_Lp>&, __enable_shared_from_this_helper(const shared_count<_Lp>&,
const __enable_shared_from_this<_Tp1, _Lp>*, const __enable_shared_from_this<_Tp1,
const _Tp2*); _Lp>*, const _Tp2*);
template<_Lock_policy _Lp> template<_Lock_policy _Lp>
inline void inline void
__enable_shared_from_this_helper(const shared_count<_Lp>&, ...) __enable_shared_from_this_helper(const shared_count<_Lp>&, ...)
{ } { }
/** /**
* @class shared_ptr <tr1/memory> * @class shared_ptr <tr1/memory>
* *
* A smart pointer with reference-counted copy semantics. * A smart pointer with reference-counted copy semantics.
* The object pointed to is deleted when the last shared_ptr pointing to it * The object pointed to is deleted when the last shared_ptr pointing to
* is destroyed or reset. * it is destroyed or reset.
*/ */
template<typename _Tp, _Lock_policy _Lp> template<typename _Tp, _Lock_policy _Lp>
class __shared_ptr class __shared_ptr
{ {
typedef typename shared_ptr_traits<_Tp>::reference _Reference; typedef typename __shared_ptr_reference<_Tp>::__type _Reference;
public: public:
typedef _Tp element_type; typedef _Tp element_type;
...@@ -511,7 +515,8 @@ template<typename _Tp, _Lock_policy _Lp> ...@@ -511,7 +515,8 @@ template<typename _Tp, _Lock_policy _Lp>
* @throw std::bad_alloc, in which case @c delete @a p is called. * @throw std::bad_alloc, in which case @c delete @a p is called.
*/ */
template<typename _Tp1> template<typename _Tp1>
explicit __shared_ptr(_Tp1* __p) explicit
__shared_ptr(_Tp1* __p)
: _M_ptr(__p), _M_refcount(__p, _Sp_deleter<_Tp1>()) : _M_ptr(__p), _M_refcount(__p, _Sp_deleter<_Tp1>())
{ {
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
...@@ -542,8 +547,9 @@ template<typename _Tp, _Lock_policy _Lp> ...@@ -542,8 +547,9 @@ template<typename _Tp, _Lock_policy _Lp>
// generated copy constructor, assignment, destructor are fine. // generated copy constructor, assignment, destructor are fine.
/** @brief If @a r is empty, constructs an empty %__shared_ptr; otherwise /** @brief If @a r is empty, constructs an empty %__shared_ptr;
* construct a %__shared_ptr that shares ownership with @a r. * otherwise construct a %__shared_ptr that shares ownership
* with @a r.
* @param r A %__shared_ptr. * @param r A %__shared_ptr.
* @post get() == r.get() && use_count() == r.use_count() * @post get() == r.get() && use_count() == r.use_count()
* @throw std::bad_alloc, in which case * @throw std::bad_alloc, in which case
...@@ -561,7 +567,8 @@ template<typename _Tp, _Lock_policy _Lp> ...@@ -561,7 +567,8 @@ template<typename _Tp, _Lock_policy _Lp>
* in which case the constructor has no effect. * in which case the constructor has no effect.
*/ */
template<typename _Tp1> template<typename _Tp1>
explicit __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r) explicit
__shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
: _M_refcount(__r._M_refcount) // may throw : _M_refcount(__r._M_refcount) // may throw
{ {
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
...@@ -574,7 +581,8 @@ template<typename _Tp, _Lock_policy _Lp> ...@@ -574,7 +581,8 @@ template<typename _Tp, _Lock_policy _Lp>
* @post use_count() == 1 and r.get() == 0 * @post use_count() == 1 and r.get() == 0
*/ */
template<typename _Tp1> template<typename _Tp1>
explicit __shared_ptr(std::auto_ptr<_Tp1>& __r) explicit
__shared_ptr(std::auto_ptr<_Tp1>& __r)
: _M_ptr(__r.get()), _M_refcount() : _M_ptr(__r.get()), _M_refcount()
{ {
// TODO requires r.release() convertible to _Tp*, Tp1 is complete, // TODO requires r.release() convertible to _Tp*, Tp1 is complete,
...@@ -718,45 +726,45 @@ template<typename _Tp, _Lock_policy _Lp> ...@@ -718,45 +726,45 @@ template<typename _Tp, _Lock_policy _Lp>
shared_count<_Lp> _M_refcount; // Reference counter. shared_count<_Lp> _M_refcount; // Reference counter.
}; };
// 2.2.3.8 shared_ptr specialized algorithms. // 2.2.3.8 shared_ptr specialized algorithms.
template<typename _Tp, _Lock_policy _Lp> template<typename _Tp, _Lock_policy _Lp>
inline void inline void
swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
{ __a.swap(__b); } { __a.swap(__b); }
// 2.2.3.9 shared_ptr casts // 2.2.3.9 shared_ptr casts
/** @warning The seemingly equivalent /** @warning The seemingly equivalent
* <code>shared_ptr<T>(static_cast<T*>(r.get()))</code> * <code>shared_ptr<T>(static_cast<T*>(r.get()))</code>
* will eventually result in undefined behaviour, * will eventually result in undefined behaviour,
* attempting to delete the same object twice. * attempting to delete the same object twice.
*/ */
template<typename _Tp, typename _Tp1, _Lock_policy _Lp> template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
__shared_ptr<_Tp, _Lp> __shared_ptr<_Tp, _Lp>
static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
{ return __shared_ptr<_Tp, _Lp>(__r, __static_cast_tag()); } { return __shared_ptr<_Tp, _Lp>(__r, __static_cast_tag()); }
/** @warning The seemingly equivalent /** @warning The seemingly equivalent
* <code>shared_ptr<T>(const_cast<T*>(r.get()))</code> * <code>shared_ptr<T>(const_cast<T*>(r.get()))</code>
* will eventually result in undefined behaviour, * will eventually result in undefined behaviour,
* attempting to delete the same object twice. * attempting to delete the same object twice.
*/ */
template<typename _Tp, typename _Tp1, _Lock_policy _Lp> template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
__shared_ptr<_Tp, _Lp> __shared_ptr<_Tp, _Lp>
const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
{ return __shared_ptr<_Tp, _Lp>(__r, __const_cast_tag()); } { return __shared_ptr<_Tp, _Lp>(__r, __const_cast_tag()); }
/** @warning The seemingly equivalent /** @warning The seemingly equivalent
* <code>shared_ptr<T>(dynamic_cast<T*>(r.get()))</code> * <code>shared_ptr<T>(dynamic_cast<T*>(r.get()))</code>
* will eventually result in undefined behaviour, * will eventually result in undefined behaviour,
* attempting to delete the same object twice. * attempting to delete the same object twice.
*/ */
template<typename _Tp, typename _Tp1, _Lock_policy _Lp> template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
__shared_ptr<_Tp, _Lp> __shared_ptr<_Tp, _Lp>
dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
{ return __shared_ptr<_Tp, _Lp>(__r, __dynamic_cast_tag()); } { return __shared_ptr<_Tp, _Lp>(__r, __dynamic_cast_tag()); }
// 2.2.3.7 shared_ptr I/O // 2.2.3.7 shared_ptr I/O
template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp> template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
std::basic_ostream<_Ch, _Tr>& std::basic_ostream<_Ch, _Tr>&
operator<<(std::basic_ostream<_Ch, _Tr>& __os, operator<<(std::basic_ostream<_Ch, _Tr>& __os,
const __shared_ptr<_Tp, _Lp>& __p) const __shared_ptr<_Tp, _Lp>& __p)
...@@ -765,14 +773,14 @@ template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp> ...@@ -765,14 +773,14 @@ template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
return __os; return __os;
} }
// 2.2.3.10 shared_ptr get_deleter (experimental) // 2.2.3.10 shared_ptr get_deleter (experimental)
template<typename _Del, typename _Tp, _Lock_policy _Lp> template<typename _Del, typename _Tp, _Lock_policy _Lp>
inline _Del* inline _Del*
get_deleter(const __shared_ptr<_Tp, _Lp>& __p) get_deleter(const __shared_ptr<_Tp, _Lp>& __p)
{ return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); } { return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); }
template<typename _Tp, _Lock_policy _Lp> template<typename _Tp, _Lock_policy _Lp>
class __weak_ptr class __weak_ptr
{ {
public: public:
...@@ -903,14 +911,14 @@ template<typename _Tp, _Lock_policy _Lp> ...@@ -903,14 +911,14 @@ template<typename _Tp, _Lock_policy _Lp>
weak_count<_Lp> _M_refcount; // Reference counter. weak_count<_Lp> _M_refcount; // Reference counter.
}; };
// 2.2.4.7 weak_ptr specialized algorithms. // 2.2.4.7 weak_ptr specialized algorithms.
template<typename _Tp, _Lock_policy _Lp> template<typename _Tp, _Lock_policy _Lp>
void void
swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b)
{ __a.swap(__b); } { __a.swap(__b); }
template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
class __enable_shared_from_this class __enable_shared_from_this
{ {
protected: protected:
...@@ -958,12 +966,12 @@ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> ...@@ -958,12 +966,12 @@ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
mutable __weak_ptr<_Tp, _Lp> _M_weak_this; mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
}; };
template<typename _Tp> template<typename _Tp>
class shared_ptr; class shared_ptr;
// The actual TR1 weak_ptr, with forwarding constructors and // The actual TR1 weak_ptr, with forwarding constructors and
// assignment operators. // assignment operators.
template<typename _Tp> template<typename _Tp>
class weak_ptr : public __weak_ptr<_Tp> class weak_ptr : public __weak_ptr<_Tp>
{ {
public: public:
...@@ -992,16 +1000,17 @@ template<typename _Tp> ...@@ -992,16 +1000,17 @@ template<typename _Tp>
} }
}; };
// The actual TR1 shared_ptr, with forwarding constructors and // The actual TR1 shared_ptr, with forwarding constructors and
// assignment operators. // assignment operators.
template<typename _Tp> template<typename _Tp>
class shared_ptr : public __shared_ptr<_Tp> class shared_ptr : public __shared_ptr<_Tp>
{ {
public: public:
shared_ptr() : __shared_ptr<_Tp>() { } shared_ptr() : __shared_ptr<_Tp>() { }
template<typename _Tp1> template<typename _Tp1>
explicit shared_ptr(_Tp1* __p) explicit
shared_ptr(_Tp1* __p)
: __shared_ptr<_Tp>(__p) { } : __shared_ptr<_Tp>(__p) { }
template<typename _Tp1, typename _Deleter> template<typename _Tp1, typename _Deleter>
...@@ -1013,11 +1022,13 @@ template<typename _Tp> ...@@ -1013,11 +1022,13 @@ template<typename _Tp>
: __shared_ptr<_Tp>(__r) { } : __shared_ptr<_Tp>(__r) { }
template<typename _Tp1> template<typename _Tp1>
explicit shared_ptr(const __weak_ptr<_Tp1>& __r) explicit
shared_ptr(const __weak_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { } : __shared_ptr<_Tp>(__r) { }
template<typename _Tp1> template<typename _Tp1>
explicit shared_ptr(std::auto_ptr<_Tp1>& __r) explicit
shared_ptr(std::auto_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { } : __shared_ptr<_Tp>(__r) { }
template<typename _Tp1> template<typename _Tp1>
...@@ -1050,7 +1061,7 @@ template<typename _Tp> ...@@ -1050,7 +1061,7 @@ template<typename _Tp>
} }
}; };
template<typename _Tp> template<typename _Tp>
class enable_shared_from_this : public __enable_shared_from_this<_Tp> class enable_shared_from_this : public __enable_shared_from_this<_Tp>
{ {
protected: protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment