libcopp
1.1.0
|
侵入式智能指针 More...
#include <assert.h>
#include <cstddef>
#include <ostream>
#include <libcopp/utils/config/build_feature.h>
#include <libcopp/utils/config/compiler_features.h>
Go to the source code of this file.
Data Structures | |
class | std::intrusive_ptr< T > |
Macros | |
#define | UTIL_INTRUSIVE_PTR_ATOMIC_TYPE ::util::lock::atomic_int_type<size_t> |
#define | UTIL_INTRUSIVE_PTR_REF_MEMBER_DECL(T) |
#define | UTIL_INTRUSIVE_PTR_REF_FN_DECL(T) |
#define | UTIL_INTRUSIVE_PTR_REF_MEMBER_INIT() this->intrusive_ref_counter_.store(0) |
#define | UTIL_INTRUSIVE_PTR_REF_FN_DEFI(T) |
Functions | |
template<typename T , typename U > | |
bool | std::operator== (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b) |
template<typename T , typename U > | |
bool | std::operator!= (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b) |
template<typename T , typename U > | |
bool | std::operator== (intrusive_ptr< T > const &a, U *b) |
template<typename T , typename U > | |
bool | std::operator!= (intrusive_ptr< T > const &a, U *b) |
template<typename T , typename U > | |
bool | std::operator== (T *a, intrusive_ptr< U > const &b) |
template<typename T , typename U > | |
bool | std::operator!= (T *a, intrusive_ptr< U > const &b) |
template<typename T > | |
bool | std::operator< (intrusive_ptr< T > const &a, intrusive_ptr< T > const &b) |
template<typename T > | |
void | std::swap (intrusive_ptr< T > &lhs, intrusive_ptr< T > &rhs) |
template<typename T > | |
T * | std::get_pointer (intrusive_ptr< T > const &p) |
template<typename T , typename U > | |
intrusive_ptr< T > | std::static_pointer_cast (intrusive_ptr< U > const &p) |
template<typename T , typename U > | |
intrusive_ptr< T > | std::const_pointer_cast (intrusive_ptr< U > const &p) |
template<typename T , typename U > | |
intrusive_ptr< T > | std::dynamic_pointer_cast (intrusive_ptr< U > const &p) |
template<typename E , typename T , typename Y > | |
std::basic_ostream< E, T > & | std::operator<< (std::basic_ostream< E, T > &os, intrusive_ptr< Y > const &p) |
侵入式智能指针
Definition in file intrusive_ptr.h.
#define UTIL_INTRUSIVE_PTR_ATOMIC_TYPE ::util::lock::atomic_int_type<size_t> |
Definition at line 250 of file intrusive_ptr.h.
#define UTIL_INTRUSIVE_PTR_REF_FN_DECL | ( | T | ) |
Definition at line 263 of file intrusive_ptr.h.
#define UTIL_INTRUSIVE_PTR_REF_FN_DEFI | ( | T | ) |
Definition at line 269 of file intrusive_ptr.h.
#define UTIL_INTRUSIVE_PTR_REF_MEMBER_DECL | ( | T | ) |
Definition at line 253 of file intrusive_ptr.h.
#define UTIL_INTRUSIVE_PTR_REF_MEMBER_INIT | ( | ) | this->intrusive_ref_counter_.store(0) |
Definition at line 267 of file intrusive_ptr.h.
intrusive_ptr<T> std::const_pointer_cast | ( | intrusive_ptr< U > const & | p | ) |
Definition at line 229 of file intrusive_ptr.h.
References std::const_pointer_cast(), and std::intrusive_ptr< T >::get().
Referenced by std::const_pointer_cast().
intrusive_ptr<T> std::dynamic_pointer_cast | ( | intrusive_ptr< U > const & | p | ) |
Definition at line 234 of file intrusive_ptr.h.
References std::dynamic_pointer_cast(), and std::intrusive_ptr< T >::get().
Referenced by std::dynamic_pointer_cast().
T* std::get_pointer | ( | intrusive_ptr< T > const & | p | ) |
Definition at line 219 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get(), and std::get_pointer().
Referenced by std::get_pointer().
|
inline |
Definition at line 158 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get(), and std::operator!=().
Referenced by std::operator!=().
|
inline |
Definition at line 168 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get(), and std::operator!=().
|
inline |
Definition at line 178 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get(), std::operator!=(), and std::operator==().
|
inline |
Definition at line 207 of file intrusive_ptr.h.
std::basic_ostream<E, T>& std::operator<< | ( | std::basic_ostream< E, T > & | os, |
intrusive_ptr< Y > const & | p | ||
) |
Definition at line 240 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get().
|
inline |
Definition at line 153 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get(), and std::operator==().
Referenced by std::operator!=(), and std::operator==().
|
inline |
Definition at line 163 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get(), and std::operator==().
|
inline |
Definition at line 173 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get(), and std::operator==().
intrusive_ptr<T> std::static_pointer_cast | ( | intrusive_ptr< U > const & | p | ) |
Definition at line 224 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::get(), and std::static_pointer_cast().
Referenced by std::static_pointer_cast().
void std::swap | ( | intrusive_ptr< T > & | lhs, |
intrusive_ptr< T > & | rhs | ||
) |
Definition at line 212 of file intrusive_ptr.h.
References std::intrusive_ptr< T >::swap().