1 #ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED 2 #define BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED 23 template<
class T>
class weak_ptr
28 typedef weak_ptr<T> this_type;
40 #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) 75 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) 86 boost::detail::sp_assert_convertible< Y, T >();
89 #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) 92 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) 101 BOOST_NOEXCEPT : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
103 boost::detail::sp_assert_convertible< Y, T >();
117 this_type( static_cast< weak_ptr && >( r ) ).swap( *
this );
125 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) 136 boost::detail::sp_assert_convertible< Y, T >();
139 #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300) 144 boost::detail::sp_assert_convertible< Y, T >();
152 #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) 157 this_type(
static_cast< weak_ptr<Y> &&
>( r ) ).swap( *
this );
166 boost::detail::sp_assert_convertible< Y, T >();
198 this_type().swap(*
this);
227 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS 243 return a.owner_before( b );
253 #endif // #ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED weak_ptr(weak_ptr const &r) BOOST_NOEXCEPT
shared_ptr< T > lock() const BOOST_NOEXCEPT
void reset() BOOST_NOEXCEPT
weak_ptr(weak_ptr< Y > &&r, typename boost::detail::sp_enable_if_convertible< Y, T >::type=boost::detail::sp_empty()) BOOST_NOEXCEPT
weak_ptr(weak_ptr< Y > const &r, typename boost::detail::sp_enable_if_convertible< Y, T >::type=boost::detail::sp_empty()) BOOST_NOEXCEPT
weak_ptr & operator=(weak_ptr< Y > &&r) BOOST_NOEXCEPT
weak_ptr(shared_ptr< Y > const &r, typename boost::detail::sp_enable_if_convertible< Y, T >::type=boost::detail::sp_empty()) BOOST_NOEXCEPT
long use_count() const BOOST_NOEXCEPT
void _internal_aliasing_assign(weak_ptr< Y > const &r, element_type *px2)
weak_ptr & operator=(weak_ptr &&r) BOOST_NOEXCEPT
element_type * get() const BOOST_NOEXCEPT
weak_ptr(weak_ptr &&r) BOOST_NOEXCEPT
void swap(weak_ptr< T > &a, weak_ptr< T > &b) BOOST_NOEXCEPT
weak_ptr & operator=(weak_ptr const &r) BOOST_NOEXCEPT
void swap(this_type &other) BOOST_NOEXCEPT
bool owner_before(shared_ptr< Y > const &rhs) const BOOST_NOEXCEPT
bool owner_before(weak_ptr< Y > const &rhs) const BOOST_NOEXCEPT
weak_ptr() BOOST_NOEXCEPT
weak_ptr & operator=(shared_ptr< Y > const &r) BOOST_NOEXCEPT
bool expired() const BOOST_NOEXCEPT
boost::detail::sp_element< T >::type element_type
weak_ptr & operator=(weak_ptr< Y > const &r) BOOST_NOEXCEPT