Lagrange
weak_ptr< T > Class Template Reference

Public Types

using element_type = typename std::remove_extent< T >::type
 

Public Member Functions

constexpr weak_ptr () noexcept
 Default constructor, creates an empty weak_ptr Postconditions: use_count() == 0.
 
template<class U >
 weak_ptr (shared_ptr< U > const &sp) noexcept
 Conversion constructor: shares ownership with sp Postconditions: use_count() == sp.use_count().
 
 weak_ptr (weak_ptr const &wp) noexcept
 Copy constructor: shares ownership with wp Postconditions: use_count() == wp.use_count().
 
template<class U >
 weak_ptr (weak_ptr< U > const &wp) noexcept
 Copy constructor: shares ownership with wp Postconditions: use_count() == wp.use_count().
 
weak_ptroperator= (const weak_ptr &wp) noexcept
 
template<typename U >
weak_ptroperator= (const weak_ptr< U > &wp) noexcept
 
template<typename U >
weak_ptroperator= (const shared_ptr< U > &sp) noexcept
 
void swap (weak_ptr &wp) noexcept
 Exchanges the contents of *this and sp.
 
void reset () noexcept
 Resets *this to empty.
 
long use_count () const noexcept
 Gets use_count.
 
bool expired () const noexcept
 Checks if use_count == 0.
 
shared_ptr< T > lock () const noexcept
 Checks if there is a managed object.
 

The documentation for this class was generated from the following files: