|
libcopp 2.3.1
|
Data Structures | |
| class | __rc_ptr_counted_data_base |
| class | __rc_ptr_counted_data_default |
| Template class definition for reference-counted. More... | |
| class | __rc_ptr_counted_data_inplace |
| Template class definition for reference-counted.(inplacement) More... | |
| class | __rc_ptr_counted_data_inplace_alloc |
| Template class definition for reference-counted with allocator.(inplacement) More... | |
| class | __rc_ptr_counted_data_with_deleter |
| Template class definition for reference-counted with deletor. More... | |
| class | __rc_ptr_counted_data_with_deleter_allocator |
| Template class definition for reference-counted with deletor and allocator. More... | |
| class | __strong_rc_counter |
| struct | __strong_rc_default_alloc_shared_tag |
| struct | __strong_rc_ptr_compare_common_type |
| struct | __strong_rc_ptr_compare_common_type< T1, T2, false > |
| struct | __strong_rc_ptr_compare_common_type< T1, T2, true > |
| struct | __strong_rc_with_alloc_shared_tag |
| class | __weak_rc_counter |
| struct | allocated_ptr |
| Non-standard RAII type for managing pointers obtained from allocators. More... | |
| struct | compat_strong_ptr_function_trait< compat_strong_ptr_mode::kStl > |
| struct | compat_strong_ptr_function_trait< compat_strong_ptr_mode::kStrongRc > |
| struct | compat_strong_ptr_type_trait |
| A simple helper trait class to switch between strong_rc_ptr and std::shared_ptr. More... | |
| class | enable_shared_rc_from_this |
| class | intrusive_ptr |
| class | strong_rc_ptr |
| A std::shared_ptr replacement that is more lightweight and do not use atomic operation for reference counting. More... | |
| class | strong_rc_ptr_access |
| Base class to mantain all shared APIs. More... | |
| class | strong_rc_ptr_access< T, false, true > |
| A helper class that used to access internal APIs for void type. More... | |
| class | strong_rc_ptr_access< T, true, false > |
| class | weak_rc_ptr |
| A std::weak_ptr replacement that is more lightweight and do not use atomic operation for reference counting. More... | |
Typedefs | |
| using | default_rc_ptr_trait = compat_strong_ptr_function_trait< compat_strong_ptr_mode::kStrongRc > |
| template<class T > | |
| using | default_strong_rc_ptr = typename default_rc_ptr_trait::template shared_ptr< T > |
| template<class T > | |
| using | default_weak_rc_ptr = typename default_rc_ptr_trait::template weak_ptr< T > |
| template<class T > | |
| using | default_enable_shared_from_this = typename default_rc_ptr_trait::template enable_shared_from_this< T > |
Enumerations | |
| enum class | compat_strong_ptr_mode : int8_t { kStrongRc = 0 , kStl = 1 } |
| Helper class to switch between strong_rc_ptr and std::shared_ptr. More... | |
Functions | |
| template<class Alloc > | |
| LIBCOPP_UTIL_SYMBOL_VISIBLE allocated_ptr< Alloc > | allocate_guarded (Alloc &a) |
| Allocate space for a single object using a. | |
| template<class T , class... ArgsT> | |
| LIBCOPP_UTIL_FORCEINLINE default_strong_rc_ptr< T > | default_make_strong (ArgsT &&... args) |
| template<class T , class Alloc , class... TArgs> | |
| LIBCOPP_UTIL_FORCEINLINE default_strong_rc_ptr< T > | default_allocate_strong (const Alloc &alloc, TArgs &&... args) |
| template<class T , class F > | |
| LIBCOPP_UTIL_FORCEINLINE default_strong_rc_ptr< T > | default_static_pointer_cast (F &&f) |
| template<class T , class F > | |
| LIBCOPP_UTIL_FORCEINLINE default_strong_rc_ptr< T > | default_const_pointer_cast (F &&f) |
| template<typename T , typename U > | |
| bool | operator== (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator== (intrusive_ptr< T > const &a, U *b) noexcept |
| template<typename T , typename U > | |
| bool | operator== (T *a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator!= (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator!= (intrusive_ptr< T > const &a, U *b) noexcept |
| template<typename T , typename U > | |
| bool | operator!= (T *a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator< (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator< (intrusive_ptr< T > const &a, U *b) noexcept |
| template<typename T , typename U > | |
| bool | operator< (T *a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator<= (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator<= (intrusive_ptr< T > const &a, U *b) noexcept |
| template<typename T , typename U > | |
| bool | operator<= (T *a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator> (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator> (intrusive_ptr< T > const &a, U *b) noexcept |
| template<typename T , typename U > | |
| bool | operator> (T *a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator>= (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b) noexcept |
| template<typename T , typename U > | |
| bool | operator>= (intrusive_ptr< T > const &a, U *b) noexcept |
| template<typename T , typename U > | |
| bool | operator>= (T *a, intrusive_ptr< U > const &b) noexcept |
| template<typename T > | |
| bool | operator== (intrusive_ptr< T > const &p, std::nullptr_t) noexcept |
| template<typename T > | |
| bool | operator== (std::nullptr_t, intrusive_ptr< T > const &p) noexcept |
| template<typename T > | |
| bool | operator!= (intrusive_ptr< T > const &p, std::nullptr_t) noexcept |
| template<typename T > | |
| bool | operator!= (std::nullptr_t, intrusive_ptr< T > const &p) noexcept |
| template<typename T > | |
| bool | operator< (intrusive_ptr< T > const &p, std::nullptr_t) noexcept |
| template<typename T > | |
| bool | operator< (std::nullptr_t, intrusive_ptr< T > const &p) noexcept |
| template<typename T > | |
| bool | operator<= (intrusive_ptr< T > const &p, std::nullptr_t) noexcept |
| template<typename T > | |
| bool | operator<= (std::nullptr_t, intrusive_ptr< T > const &p) noexcept |
| template<typename T > | |
| bool | operator> (intrusive_ptr< T > const &p, std::nullptr_t) noexcept |
| template<typename T > | |
| bool | operator> (std::nullptr_t, intrusive_ptr< T > const &p) noexcept |
| template<typename T > | |
| bool | operator>= (intrusive_ptr< T > const &p, std::nullptr_t) noexcept |
| template<typename T > | |
| bool | operator>= (std::nullptr_t, intrusive_ptr< T > const &p) noexcept |
| template<typename T > | |
| void | swap (intrusive_ptr< T > &lhs, intrusive_ptr< T > &rhs) |
| template<typename T > | |
| T * | get_pointer (intrusive_ptr< T > const &p) |
| template<typename T , typename U > | |
| intrusive_ptr< T > | static_pointer_cast (intrusive_ptr< U > const &p) |
| template<typename T , typename U > | |
| intrusive_ptr< T > | const_pointer_cast (intrusive_ptr< U > const &p) |
| template<typename E , typename T , typename Y > | |
| std::basic_ostream< E, T > & | operator<< (std::basic_ostream< E, T > &os, intrusive_ptr< Y > const &p) |
| template<class T1 , class T2 , class T3 > | |
| LIBCOPP_COPP_API_HEAD_ONLY void | __enable_shared_from_this_with (const __strong_rc_counter< T1 > *__n, const T2 *__py, const enable_shared_rc_from_this< T3 > *__p) |
| A helper class that used to inject datas for classes that inherit enable_shared_rc_from_this. | |
| template<class T1 , class T2 , class T3 , size_t T3SIZE> | |
| LIBCOPP_COPP_API_HEAD_ONLY void | __enable_shared_from_this_with (const __strong_rc_counter< T1 > *__n, const T2 *__py, const enable_shared_rc_from_this< T3[T3SIZE]> *__p) |
| LIBCOPP_COPP_API_HEAD_ONLY void | __enable_shared_from_this_with (...) |
| template<class T1 , class T2 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator== (const strong_rc_ptr< T1 > &l, const strong_rc_ptr< T2 > &r) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator== (const strong_rc_ptr< T1 > &l, ::std::nullptr_t) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator== (::std::nullptr_t, const strong_rc_ptr< T1 > &r) noexcept |
| template<class T1 , class T2 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator!= (const strong_rc_ptr< T1 > &l, const strong_rc_ptr< T2 > &r) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator!= (const strong_rc_ptr< T1 > &l, ::std::nullptr_t) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator!= (::std::nullptr_t, const strong_rc_ptr< T1 > &r) noexcept |
| template<class T1 , class T2 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator< (const strong_rc_ptr< T1 > &l, const strong_rc_ptr< T2 > &r) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator< (const strong_rc_ptr< T1 > &l, ::std::nullptr_t) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator< (::std::nullptr_t, const strong_rc_ptr< T1 > &r) noexcept |
| template<class T1 , class T2 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator> (const strong_rc_ptr< T1 > &l, const strong_rc_ptr< T2 > &r) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator> (const strong_rc_ptr< T1 > &l, ::std::nullptr_t) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator> (::std::nullptr_t, const strong_rc_ptr< T1 > &r) noexcept |
| template<class T1 , class T2 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator<= (const strong_rc_ptr< T1 > &l, const strong_rc_ptr< T2 > &r) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator<= (const strong_rc_ptr< T1 > &l, ::std::nullptr_t) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator<= (::std::nullptr_t, const strong_rc_ptr< T1 > &r) noexcept |
| template<class T1 , class T2 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator>= (const strong_rc_ptr< T1 > &l, const strong_rc_ptr< T2 > &r) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator>= (const strong_rc_ptr< T1 > &l, ::std::nullptr_t) noexcept |
| template<class T1 > | |
| LIBCOPP_COPP_API_HEAD_ONLY bool | operator>= (::std::nullptr_t, const strong_rc_ptr< T1 > &r) noexcept |
| template<class T , class... TArgs> | |
| nostd::enable_if_t<!::std::is_array< T >::value, strong_rc_ptr< T > > | make_strong_rc (TArgs &&... args) |
| A std::make_shared replacement for strong_rc_ptr(non-array). | |
| template<class T , class... TArgs> | |
| nostd::enable_if_t< nostd::is_bounded_array< T >::value, strong_rc_ptr< T > > | make_strong_rc (TArgs &&... args) |
| A std::make_shared replacement for strong_rc_ptr(bounded array). | |
| template<class T , class Alloc , class... TArgs> | |
| nostd::enable_if_t<!::std::is_array< T >::value, strong_rc_ptr< T > > | allocate_strong_rc (const Alloc &alloc, TArgs &&... args) |
| A std::allocate_shared (C++20) replacement for strong_rc_ptr(non-array). | |
| template<class T , class Alloc , class... TArgs> | |
| nostd::enable_if_t< nostd::is_bounded_array< T >::value, strong_rc_ptr< T > > | allocate_strong_rc (const Alloc &alloc, TArgs &&... args) |
| A std::allocate_shared (C++20) replacement for strong_rc_ptr(bounded array). | |
| template<class T , class Y > | |
| strong_rc_ptr< T > | static_pointer_cast (const strong_rc_ptr< Y > &r) noexcept |
| A std::static_pointer_cast replacement for strong_rc_ptr. | |
| template<class T , class Y > | |
| strong_rc_ptr< T > | const_pointer_cast (const strong_rc_ptr< Y > &r) noexcept |
| A std::const_pointer_cast replacement for strong_rc_ptr. | |
Variables | |
| template<class T > | |
| class LIBCOPP_COPP_API_HEAD_ONLY | weak_rc_ptr |
| template<class T > | |
| class LIBCOPP_COPP_API_HEAD_ONLY | strong_rc_ptr |
| template<class T > | |
| class LIBCOPP_COPP_API_HEAD_ONLY | enable_shared_rc_from_this |
| template<class T > | |
| class LIBCOPP_COPP_API_HEAD_ONLY | __weak_rc_counter |
| template<compat_strong_ptr_mode > | |
| struct LIBCOPP_COPP_API_HEAD_ONLY | compat_strong_ptr_function_trait |
| Helper trait class to switch between strong_rc_ptr and std::shared_ptr. | |
| using memory::default_enable_shared_from_this = typedef typename default_rc_ptr_trait::template enable_shared_from_this<T> |
Definition at line 28 of file default_smart_ptr_trait.h.
| using memory::default_rc_ptr_trait = typedef compat_strong_ptr_function_trait<compat_strong_ptr_mode::kStrongRc> |
Definition at line 18 of file default_smart_ptr_trait.h.
| using memory::default_strong_rc_ptr = typedef typename default_rc_ptr_trait::template shared_ptr<T> |
Definition at line 22 of file default_smart_ptr_trait.h.
| using memory::default_weak_rc_ptr = typedef typename default_rc_ptr_trait::template weak_ptr<T> |
Definition at line 25 of file default_smart_ptr_trait.h.
|
strong |
Helper class to switch between strong_rc_ptr and std::shared_ptr.
| Enumerator | |
|---|---|
| kStrongRc | |
| kStl | |
|
inline |
|
inline |
A helper class that used to inject datas for classes that inherit enable_shared_rc_from_this.
Definition at line 749 of file rc_ptr.h.
References memory::enable_shared_rc_from_this< T >::__internal_weak_assign().
Referenced by memory::strong_rc_ptr< T >::strong_rc_ptr(), memory::strong_rc_ptr< T >::strong_rc_ptr(), memory::strong_rc_ptr< T >::strong_rc_ptr(), memory::strong_rc_ptr< T >::strong_rc_ptr(), memory::strong_rc_ptr< T >::strong_rc_ptr(), and memory::strong_rc_ptr< T >::strong_rc_ptr().
|
inline |
| LIBCOPP_UTIL_SYMBOL_VISIBLE allocated_ptr< Alloc > memory::allocate_guarded | ( | Alloc & | a | ) |
Allocate space for a single object using a.
Definition at line 54 of file allocator_ptr.h.
Referenced by memory::__strong_rc_counter< T >::__strong_rc_counter(), memory::__strong_rc_counter< T >::__strong_rc_counter(), memory::__strong_rc_counter< T >::__strong_rc_counter(), memory::__strong_rc_counter< T >::__strong_rc_counter(), memory::__strong_rc_counter< T >::__strong_rc_counter(), and memory::__strong_rc_counter< T >::__strong_rc_counter().
| nostd::enable_if_t<!::std::is_array< T >::value, strong_rc_ptr< T > > memory::allocate_strong_rc | ( | const Alloc & | alloc, |
| TArgs &&... | args | ||
| ) |
A std::allocate_shared (C++20) replacement for strong_rc_ptr(non-array).
| alloc | The custom allocator. |
| args | Arguments to construct the object. |
| nostd::enable_if_t< nostd::is_bounded_array< T >::value, strong_rc_ptr< T > > memory::allocate_strong_rc | ( | const Alloc & | alloc, |
| TArgs &&... | args | ||
| ) |
|
noexcept |
A std::const_pointer_cast replacement for strong_rc_ptr.
| r | A strong_rc_ptr instance. |
Definition at line 1351 of file rc_ptr.h.
References const_pointer_cast().
| intrusive_ptr< T > memory::const_pointer_cast | ( | intrusive_ptr< U > const & | p | ) |
Definition at line 348 of file intrusive_ptr.h.
References const_pointer_cast(), and memory::intrusive_ptr< T >::get().
Referenced by const_pointer_cast(), and const_pointer_cast().
| LIBCOPP_UTIL_FORCEINLINE default_strong_rc_ptr< T > memory::default_allocate_strong | ( | const Alloc & | alloc, |
| TArgs &&... | args | ||
| ) |
Definition at line 36 of file default_smart_ptr_trait.h.
| LIBCOPP_UTIL_FORCEINLINE default_strong_rc_ptr< T > memory::default_const_pointer_cast | ( | F && | f | ) |
Definition at line 46 of file default_smart_ptr_trait.h.
| LIBCOPP_UTIL_FORCEINLINE default_strong_rc_ptr< T > memory::default_make_strong | ( | ArgsT &&... | args | ) |
Definition at line 31 of file default_smart_ptr_trait.h.
| LIBCOPP_UTIL_FORCEINLINE default_strong_rc_ptr< T > memory::default_static_pointer_cast | ( | F && | f | ) |
Definition at line 41 of file default_smart_ptr_trait.h.
| T * memory::get_pointer | ( | intrusive_ptr< T > const & | p | ) |
Definition at line 338 of file intrusive_ptr.h.
References memory::intrusive_ptr< T >::get(), and get_pointer().
Referenced by get_pointer().
| nostd::enable_if_t<!::std::is_array< T >::value, strong_rc_ptr< T > > memory::make_strong_rc | ( | TArgs &&... | args | ) |
A std::make_shared replacement for strong_rc_ptr(non-array).
| args | Arguments to construct the object. |
| nostd::enable_if_t< nostd::is_bounded_array< T >::value, strong_rc_ptr< T > > memory::make_strong_rc | ( | TArgs &&... | args | ) |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 182 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 187 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 280 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 285 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 192 of file intrusive_ptr.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 197 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 202 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 290 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 295 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 207 of file intrusive_ptr.h.
| std::basic_ostream< E, T > & memory::operator<< | ( | std::basic_ostream< E, T > & | os, |
| intrusive_ptr< Y > const & | p | ||
| ) |
Definition at line 348 of file intrusive_ptr.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 212 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 217 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 300 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 305 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 222 of file intrusive_ptr.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 151 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 156 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 259 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 264 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 161 of file intrusive_ptr.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 227 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 232 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 310 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 315 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 237 of file intrusive_ptr.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 242 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 247 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 320 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 325 of file intrusive_ptr.h.
|
inlinenoexcept |
Definition at line 252 of file intrusive_ptr.h.
|
noexcept |
A std::static_pointer_cast replacement for strong_rc_ptr.
| r | A strong_rc_ptr instance. |
Definition at line 1341 of file rc_ptr.h.
References static_pointer_cast().
| intrusive_ptr< T > memory::static_pointer_cast | ( | intrusive_ptr< U > const & | p | ) |
Definition at line 343 of file intrusive_ptr.h.
References memory::intrusive_ptr< T >::get(), and static_pointer_cast().
Referenced by static_pointer_cast(), and static_pointer_cast().
| void memory::swap | ( | intrusive_ptr< T > & | lhs, |
| intrusive_ptr< T > & | rhs | ||
| ) |
Definition at line 331 of file intrusive_ptr.h.
References memory::intrusive_ptr< T >::swap(), and swap().
Referenced by swap().
| class LIBCOPP_COPP_API_HEAD_ONLY memory::__weak_rc_counter |
| struct LIBCOPP_COPP_API_HEAD_ONLY memory::compat_strong_ptr_function_trait |
Helper trait class to switch between strong_rc_ptr and std::shared_ptr.
| class LIBCOPP_COPP_API_HEAD_ONLY memory::enable_shared_rc_from_this |
| class LIBCOPP_COPP_API_HEAD_ONLY memory::strong_rc_ptr |
| class LIBCOPP_COPP_API_HEAD_ONLY memory::weak_rc_ptr |