13#if __cplusplus<201103L
21#include <pv/epicsException.h>
54 void show_refs(std::ostream&,
bool self=
true,
bool weak=
false)
const;
67#ifndef EXCEPT_USE_NONE
68 :m_stack(), m_depth(0)
72 #ifndef EXCEPT_USE_NONE
73 ,m_stack(), m_depth(0)
81 void track_new(
const void* ptr);
88#ifndef EXCEPT_USE_NONE
89 void *m_stack[EXCEPT_DEPTH];
94 void show_stack(std::ostream&)
const;
106template<
typename Store,
typename Actual>
144 template<
typename A,
class ... Args>
147 do_enable_shared_from_this(*
this, a);
176 void reset()
noexcept { real.reset(); track_clear(); }
177 template<
typename A,
class ... Args>
178 void reset(A* a, Args ... args)
180 real.reset(a, args...);
182 do_enable_shared_from_this(*
this, a);
188 shared_ptr_base::swap(o);
194 T* get()
const noexcept {
return real.get(); }
196 T* operator->()
const noexcept {
return real.get(); }
197 long use_count()
const noexcept {
return real.use_count(); }
198 bool unique()
const noexcept {
return real.unique(); }
199 explicit operator bool()
const noexcept {
return bool(real); }
201 bool operator==(
const shared_ptr<T>& o)
const {
return real==o.real; }
202 bool operator!=(
const shared_ptr<T>& o)
const {
return real!=o.real; }
203 bool operator<(
const shared_ptr<T>& o)
const {
return real<o.real; }
206 bool owner_before(
const shared_ptr<A>& o) {
return real.owner_before(o); }
208 bool owner_before(
const weak_ptr<A>& o) {
return real.owner_before(o); }
210 template<
typename TO,
typename FROM>
213 template<
typename TO,
typename FROM>
216 template<
typename TO,
typename FROM>
219 template<
typename Store,
typename Actual>
226template<
typename TO,
typename FROM>
231template<
typename TO,
typename FROM>
236template<
typename TO,
typename FROM>
253 typedef typename real_type::element_type element_type;
285 void reset()
noexcept { track.reset(); real.reset(); }
287 long use_count()
const noexcept {
return real.use_count(); }
288 bool unique()
const noexcept {
return real.unique(); }
289 bool expired()
const noexcept {
return real.expired(); }
296 template<
typename Store,
typename Actual>
308template<
typename Store,
typename Actual>
317 self->xxInternalSelf = actual;
321inline std::ostream&
operator<<(std::ostream& strm,
const shared_ptr<T>& ptr)
constexpr complex< _Tp > & operator=(const _Tp &)
void swap(shared_ptr< _Tp > &__a, shared_ptr< _Tp > &__b) noexcept
void swap(any &__x, any &__y) noexcept
__shared_ptr< _Tp, _Lp > dynamic_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
basic_ostream< _CharT, _Traits > & operator<<(basic_ostream< _CharT, _Traits > &__os, const basic_string< _CharT, _Traits, _Alloc > &__str)
__shared_ptr< _Tp, _Lp > static_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
__shared_ptr< _Tp, _Lp > const_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
typename __shared_ptr< _Tp >::element_type element_type