Home | History | Annotate | Download | only in tr1

Lines Matching refs:shared_ptr

1 // <tr1/shared_ptr.h> -*- C++ -*-
28 // shared_ptr.hpp
44 /** @file tr1/shared_ptr.h
315 class shared_ptr;
353 * The object pointed to is deleted when the last shared_ptr pointing to
591 // 2.2.3.8 shared_ptr specialized algorithms.
597 // 2.2.3.9 shared_ptr casts
599 * <code>shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))</code>
609 * <code>shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))</code>
619 * <code>shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))</code>
628 // 2.2.3.7 shared_ptr I/O
638 // 2.2.3.10 shared_ptr get_deleter (experimental)
828 /// shared_ptr
829 // The actual shared_ptr, with forwarding constructors and
832 class shared_ptr
836 shared_ptr()
841 shared_ptr(_Tp1* __p)
845 shared_ptr(_Tp1* __p, _Deleter __d)
849 shared_ptr(const shared_ptr<_Tp1>& __r)
854 shared_ptr(const weak_ptr<_Tp1>& __r)
860 shared_ptr(std::auto_ptr<_Tp1>& __r)
865 shared_ptr(const shared_ptr<_Tp1>& __r, __static_cast_tag)
869 shared_ptr(const shared_ptr<_Tp1>& __r, __const_cast_tag)
873 shared_ptr(const shared_ptr<_Tp1>& __r, __dynamic_cast_tag)
877 shared_ptr&
878 operator=(const shared_ptr<_Tp1>& __r) // never throws
886 shared_ptr&
895 // 2.2.3.8 shared_ptr specialized algorithms.
902 inline shared_ptr<_Tp>
903 static_pointer_cast(const shared_ptr<_Tp1>& __r)
904 { return shared_ptr<_Tp>(__r, __static_cast_tag()); }
907 inline shared_ptr<_Tp>
908 const_pointer_cast(const shared_ptr<_Tp1>& __r)
909 { return shared_ptr<_Tp>(__r, __const_cast_tag()); }
912 inline shared_ptr<_Tp>
913 dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
914 { return shared_ptr<_Tp>(__r, __dynamic_cast_tag()); }
933 weak_ptr(const shared_ptr<_Tp1>& __r)
946 operator=(const shared_ptr<_Tp1>& __r) // never throws
952 shared_ptr<_Tp>
957 return shared_ptr<_Tp>();
961 return shared_ptr<_Tp>(*this);
965 return shared_ptr<_Tp>();
968 return this->expired() ? shared_ptr<_Tp>()
969 : shared_ptr<_Tp>(*this);
990 shared_ptr<_Tp>
992 { return shared_ptr<_Tp>(this->_M_weak_this); }
994 shared_ptr<const _Tp>
996 { return shared_ptr<const _Tp>(this->_M_weak_this); }