62#if defined(SHARED_FROM_MANUAL)
65#elif __cplusplus>=201103L || (defined(_MSC_VER) && (_MSC_VER>=1600)) || defined(_LIBCPP_VERSION)
68# define SHARED_FROM_STD
70#elif defined(__GNUC__) && __GNUC__>=4 && !defined(vxWorks)
72# define SHARED_FROM_TR1
74#elif defined(_MSC_VER) && _MSC_VER==1500
78# define SHARED_TR1_FROM_STD
80#elif defined(_MSC_VER) && (_MSC_VER>1500 || defined(_HAS_TR1))
82# define SHARED_FROM_TR1
85# define SHARED_FROM_BOOST
90#if defined(SHARED_FROM_MANUAL)
92#elif defined(SHARED_FROM_STD)
96#ifndef DEBUG_SHARED_PTR
100 using ::std::shared_ptr;
101 using ::std::weak_ptr;
102 using ::std::static_pointer_cast;
103 using ::std::dynamic_pointer_cast;
104 using ::std::const_pointer_cast;
105 using ::std::enable_shared_from_this;
106 using ::std::bad_weak_ptr;
116 using ::epics::debug::shared_ptr;
117 using ::epics::debug::weak_ptr;
118 using ::epics::debug::static_pointer_cast;
119 using ::epics::debug::dynamic_pointer_cast;
120 using ::epics::debug::const_pointer_cast;
121 using ::epics::debug::enable_shared_from_this;
122 using ::std::bad_weak_ptr;
129#elif defined(SHARED_TR1_FROM_STD)
132#elif defined(SHARED_FROM_TR1)
133# include <tr1/memory>
135#elif defined(SHARED_FROM_BOOST)
137#if defined(__GNUC__) && __GNUC__ < 3
138#define BOOST_EXCEPTION_DISABLE
139#define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
142# include <boost/tr1/memory.hpp>
145# error No shared_ptr selection
150#ifdef SHARED_FROM_STD
151# undef SHARED_FROM_STD
154#ifdef SHARED_FROM_TR1
155# undef SHARED_FROM_TR1
158#ifdef SHARED_FROM_BOOST
159# undef SHARED_FROM_BOOST
165 const std::tr1::shared_ptr<T>& ptr;
167 ref_shower(
const std::tr1::shared_ptr<T>& ptr,
bool self,
bool weak) :ptr(ptr),self(self),weak(weak) {}
182inline ::detail::ref_shower<T>
show_referrers(
const std::tr1::shared_ptr<T>& ptr,
bool self=
true,
bool weak=
false)
184 return ::detail::ref_shower<T>(ptr, self, weak);
189inline std::ostream&
operator<<(std::ostream& strm, const ::detail::ref_shower<T>& refs)
192 refs.ptr.show_refs(strm, refs.self, refs.weak);
198#define POINTER_DEFINITIONS(clazz) \
199 typedef std::tr1::shared_ptr<clazz> shared_pointer; \
200 typedef std::tr1::shared_ptr<const clazz> const_shared_pointer; \
201 typedef std::tr1::weak_ptr<clazz> weak_pointer; \
202 typedef std::tr1::weak_ptr<const clazz> const_weak_pointer
218#if __cplusplus>=201103L
222static inline void swap(auto_ptr<T>& lhs, auto_ptr<T>& rhs) {
228static inline void swap(auto_ptr<T>& lhs, auto_ptr<T>& rhs) {
229 auto_ptr<T> temp(lhs);
void swap(any &__x, any &__y) noexcept
__rvalue_stream_insertion_t< _Ostream, _Tp > operator<<(_Ostream &&__os, const _Tp &__x)
inline ::detail::ref_shower< T > show_referrers(const std::tr1::shared_ptr< T > &ptr, bool self=true, bool weak=false)