MOS Source Code
Loading...
Searching...
No Matches
weak_ptr< T > Class Template Reference

#include <shared_ptr.hpp>

Public Types

using element_type = std::remove_extent_t<T>
 

Public Member Functions

constexpr weak_ptr ()
 
constexpr weak_ptr (std::nullptr_t)
 
 weak_ptr (const weak_ptr &r) noexcept
 
template<class Y>
 weak_ptr (const weak_ptr< Y > &r) noexcept
 
template<class Y>
 weak_ptr (const shared_ptr< Y > &r) noexcept
 
 weak_ptr (weak_ptr &&r) noexcept
 
template<class Y>
 weak_ptr (weak_ptr< Y > &&r) noexcept
 
long use_count () const
 
bool expired () const
 
shared_ptr< T > lock ()
 
 ~weak_ptr ()
 

Private Attributes

__shared_ptr_core< T > * _c
 

Friends

class shared_ptr< T >
 

Detailed Description

template<typename T>
class mos::weak_ptr< T >

Definition at line 68 of file shared_ptr.hpp.

Member Typedef Documentation

◆ element_type

template<typename T>
using element_type = std::remove_extent_t<T>

Definition at line 73 of file shared_ptr.hpp.

Constructor & Destructor Documentation

◆ weak_ptr() [1/7]

template<typename T>
weak_ptr ( )
inlineconstexpr

Definition at line 76 of file shared_ptr.hpp.

Referenced by weak_ptr(), weak_ptr(), weak_ptr(), and weak_ptr().

◆ weak_ptr() [2/7]

template<typename T>
weak_ptr ( std::nullptr_t )
inlineconstexpr

Definition at line 77 of file shared_ptr.hpp.

◆ weak_ptr() [3/7]

template<typename T>
weak_ptr ( const weak_ptr< T > & r)
inlinenoexcept

Definition at line 79 of file shared_ptr.hpp.

+ Here is the call graph for this function:

◆ weak_ptr() [4/7]

template<typename T>
template<class Y>
weak_ptr ( const weak_ptr< Y > & r)
inlinenoexcept

Definition at line 85 of file shared_ptr.hpp.

+ Here is the call graph for this function:

◆ weak_ptr() [5/7]

template<typename T>
template<class Y>
weak_ptr ( const shared_ptr< Y > & r)
inlinenoexcept

Definition at line 91 of file shared_ptr.hpp.

◆ weak_ptr() [6/7]

template<typename T>
weak_ptr ( weak_ptr< T > && r)
inlinenoexcept

Definition at line 96 of file shared_ptr.hpp.

+ Here is the call graph for this function:

◆ weak_ptr() [7/7]

template<typename T>
template<class Y>
weak_ptr ( weak_ptr< Y > && r)
inlinenoexcept

Definition at line 102 of file shared_ptr.hpp.

+ Here is the call graph for this function:

◆ ~weak_ptr()

template<typename T>
~weak_ptr ( )
inline

Definition at line 127 of file shared_ptr.hpp.

Member Function Documentation

◆ use_count()

template<typename T>
long use_count ( ) const
inline

Definition at line 108 of file shared_ptr.hpp.

Referenced by expired().

◆ expired()

template<typename T>
bool expired ( ) const
inline

Definition at line 115 of file shared_ptr.hpp.

+ Here is the call graph for this function:

◆ lock()

template<typename T>
shared_ptr< T > lock ( )
inline

Definition at line 120 of file shared_ptr.hpp.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ shared_ptr< T >

template<typename T>
friend class shared_ptr< T >
friend

Definition at line 64 of file shared_ptr.hpp.

Referenced by lock().

Member Data Documentation

◆ _c

template<typename T>
__shared_ptr_core<T>* _c
private

Definition at line 135 of file shared_ptr.hpp.

Referenced by lock(), use_count(), weak_ptr(), weak_ptr(), weak_ptr(), weak_ptr(), weak_ptr(), and ~weak_ptr().


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