jle_cpp_tk  0.0 2015-04-03 sh1:"d699093732dd5f321606d0ff7a6b63b229f1922c"
A small, safe, selft contained, soft-realtime C++ toolkit
jle::weak_ptr< _Tp > Class Template Reference

A safe std weak_ptr WRAPPER. More...

#include <shared_ptr.hpp>

Public Member Functions

template<typename _Tp1 , typename = typename std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
 weak_ptr (const weak_ptr< _Tp1 > &__r)
 
template<typename _Tp1 , typename = typename std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
 weak_ptr (const shared_ptr< _Tp1 > &__r)
 
template<typename _Tp1 >
weak_ptroperator= (const weak_ptr< _Tp1 > &__r)
 
template<typename _Tp1 >
weak_ptroperator= (const jle::shared_ptr< _Tp1 > &__r)
 
shared_ptr< _Tp > lock () const
 
bool expired (void) const
 

Detailed Description

template<typename _Tp>
class jle::weak_ptr< _Tp >

A safe std weak_ptr WRAPPER.

It's almost equal to std::weak_ptr but lock will return a jle::shared_ptr

No external dependencies

Example...

A smart pointer with weak semantics.

With forwarding constructors and assignment operators.

Examples:
/core/ex_test.cpp, and /core/ex_weak_ptr.cpp.

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