49 #ifndef _TR1_SHARED_PTR_H
50 #define _TR1_SHARED_PTR_H 1
56 _GLIBCXX_BEGIN_NAMESPACE_VERSION
62 class bad_weak_ptr :
public std::exception
67 {
return "tr1::bad_weak_ptr"; }
72 __throw_bad_weak_ptr()
73 { _GLIBCXX_THROW_OR_ABORT(bad_weak_ptr()); }
75 using __gnu_cxx::_Lock_policy;
76 using __gnu_cxx::__default_lock_policy;
77 using __gnu_cxx::_S_single;
78 using __gnu_cxx::_S_mutex;
79 using __gnu_cxx::_S_atomic;
82 template<_Lock_policy _Lp>
87 enum { _S_need_barriers = 0 };
91 class _Mutex_base<_S_mutex>
92 :
public __gnu_cxx::__mutex
98 enum { _S_need_barriers = 1 };
101 template<_Lock_policy _Lp = __default_lock_policy>
102 class _Sp_counted_base
103 :
public _Mutex_base<_Lp>
107 : _M_use_count(1), _M_weak_count(1) { }
128 { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
137 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count);
138 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
140 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count);
146 if (_Mutex_base<_Lp>::_S_need_barriers)
153 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
154 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
157 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
165 { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
171 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
172 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1)
174 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
175 if (_Mutex_base<_Lp>::_S_need_barriers)
187 _M_get_use_count() const
191 return const_cast<const volatile _Atomic_word&
>(_M_use_count);
195 _Sp_counted_base(_Sp_counted_base
const&);
196 _Sp_counted_base& operator=(_Sp_counted_base
const&);
198 _Atomic_word _M_use_count;
199 _Atomic_word _M_weak_count;
204 _Sp_counted_base<_S_single>::
207 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
210 __throw_bad_weak_ptr();
216 _Sp_counted_base<_S_mutex>::
219 __gnu_cxx::__scoped_lock sentry(*
this);
220 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
223 __throw_bad_weak_ptr();
229 _Sp_counted_base<_S_atomic>::
233 _Atomic_word __count = _M_use_count;
237 __throw_bad_weak_ptr();
241 while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1,
242 true, __ATOMIC_ACQ_REL,
246 template<
typename _Ptr,
typename _Deleter, _Lock_policy _Lp>
247 class _Sp_counted_base_impl
248 :
public _Sp_counted_base<_Lp>
252 _Sp_counted_base_impl(_Ptr __p, _Deleter __d)
253 : _M_ptr(__p), _M_del(__d) { }
263 return __ti ==
typeid(_Deleter) ? &_M_del : 0;
270 _Sp_counted_base_impl(
const _Sp_counted_base_impl&);
271 _Sp_counted_base_impl& operator=(
const _Sp_counted_base_impl&);
277 template<_Lock_policy _Lp = __default_lock_policy>
280 template<
typename _Tp>
283 typedef void result_type;
284 typedef _Tp* argument_type;
285 void operator()(_Tp* __p)
const {
delete __p; }
288 template<_Lock_policy _Lp = __default_lock_policy>
296 template<
typename _Ptr>
297 __shared_count(_Ptr __p) : _M_pi(0)
301 typedef typename std::tr1::remove_pointer<_Ptr>::type _Tp;
302 _M_pi =
new _Sp_counted_base_impl<_Ptr, _Sp_deleter<_Tp>, _Lp>(
303 __p, _Sp_deleter<_Tp>());
312 template<
typename _Ptr,
typename _Deleter>
313 __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
317 _M_pi =
new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d);
327 template<
typename _Tp>
329 __shared_count(std::auto_ptr<_Tp>& __r)
330 : _M_pi(new _Sp_counted_base_impl<_Tp*,
331 _Sp_deleter<_Tp>, _Lp >(__r.get(), _Sp_deleter<_Tp>()))
336 __shared_count(
const __weak_count<_Lp>& __r);
344 __shared_count(
const __shared_count& __r)
348 _M_pi->_M_add_ref_copy();
352 operator=(
const __shared_count& __r)
354 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
358 __tmp->_M_add_ref_copy();
367 _M_swap(__shared_count& __r)
369 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
375 _M_get_use_count() const
376 {
return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
380 {
return this->_M_get_use_count() == 1; }
383 operator==(
const __shared_count& __a,
const __shared_count& __b)
384 {
return __a._M_pi == __b._M_pi; }
387 operator<(
const __shared_count& __a,
const __shared_count& __b)
388 {
return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); }
392 {
return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
395 friend class __weak_count<_Lp>;
397 _Sp_counted_base<_Lp>* _M_pi;
401 template<_Lock_policy _Lp>
409 __weak_count(
const __shared_count<_Lp>& __r)
413 _M_pi->_M_weak_add_ref();
416 __weak_count(
const __weak_count<_Lp>& __r)
420 _M_pi->_M_weak_add_ref();
426 _M_pi->_M_weak_release();
430 operator=(
const __shared_count<_Lp>& __r)
432 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
434 __tmp->_M_weak_add_ref();
436 _M_pi->_M_weak_release();
442 operator=(
const __weak_count<_Lp>& __r)
444 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
446 __tmp->_M_weak_add_ref();
448 _M_pi->_M_weak_release();
454 _M_swap(__weak_count<_Lp>& __r)
456 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
462 _M_get_use_count() const
463 {
return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
466 operator==(
const __weak_count<_Lp>& __a,
const __weak_count<_Lp>& __b)
467 {
return __a._M_pi == __b._M_pi; }
470 operator<(const __weak_count<_Lp>& __a,
const __weak_count<_Lp>& __b)
471 {
return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); }
474 friend class __shared_count<_Lp>;
476 _Sp_counted_base<_Lp>* _M_pi;
480 template<_Lock_policy _Lp>
482 __shared_count<_Lp>::
483 __shared_count(
const __weak_count<_Lp>& __r)
487 _M_pi->_M_add_ref_lock();
489 __throw_bad_weak_ptr();
493 template<
typename _Tp, _Lock_policy _Lp = __default_lock_policy>
496 template<
typename _Tp, _Lock_policy _Lp = __default_lock_policy>
499 template<
typename _Tp, _Lock_policy _Lp = __default_lock_policy>
500 class __enable_shared_from_this;
502 template<
typename _Tp>
505 template<
typename _Tp>
508 template<
typename _Tp>
509 class enable_shared_from_this;
514 template<_Lock_policy _Lp,
typename _Tp1,
typename _Tp2>
516 __enable_shared_from_this_helper(
const __shared_count<_Lp>&,
517 const __enable_shared_from_this<_Tp1,
521 template<
typename _Tp1,
typename _Tp2>
523 __enable_shared_from_this_helper(
const __shared_count<>&,
524 const enable_shared_from_this<_Tp1>*,
527 template<_Lock_policy _Lp>
529 __enable_shared_from_this_helper(
const __shared_count<_Lp>&, ...)
533 struct __static_cast_tag { };
534 struct __const_cast_tag { };
535 struct __dynamic_cast_tag { };
540 template<
typename _Tp, _Lock_policy _Lp>
544 typedef _Tp element_type;
547 : _M_ptr(0), _M_refcount()
550 template<
typename _Tp1>
552 __shared_ptr(_Tp1* __p)
553 : _M_ptr(__p), _M_refcount(__p)
556 typedef
int _IsComplete[sizeof(_Tp1)];
557 __enable_shared_from_this_helper(_M_refcount, __p, __p);
560 template<typename _Tp1, typename _Deleter>
561 __shared_ptr(_Tp1* __p, _Deleter __d)
562 : _M_ptr(__p), _M_refcount(__p, __d)
566 __enable_shared_from_this_helper(_M_refcount, __p, __p);
571 template<typename _Tp1>
572 __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
573 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
576 template<
typename _Tp1>
578 __shared_ptr(
const __weak_ptr<_Tp1, _Lp>& __r)
579 : _M_refcount(__r._M_refcount)
587 #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
589 template<
typename _Tp1>
591 __shared_ptr(std::auto_ptr<_Tp1>& __r)
592 : _M_ptr(__r.get()), _M_refcount()
595 typedef
int _IsComplete[sizeof(_Tp1)];
596 _Tp1* __tmp = __r.get();
597 _M_refcount = __shared_count<_Lp>(__r);
598 __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
603 template<
typename _Tp1>
604 __shared_ptr(
const __shared_ptr<_Tp1, _Lp>& __r, __static_cast_tag)
605 : _M_ptr(static_cast<element_type*>(__r._M_ptr)),
606 _M_refcount(__r._M_refcount)
609 template<
typename _Tp1>
610 __shared_ptr(
const __shared_ptr<_Tp1, _Lp>& __r, __const_cast_tag)
611 : _M_ptr(const_cast<element_type*>(__r._M_ptr)),
612 _M_refcount(__r._M_refcount)
615 template<
typename _Tp1>
616 __shared_ptr(
const __shared_ptr<_Tp1, _Lp>& __r, __dynamic_cast_tag)
617 : _M_ptr(dynamic_cast<element_type*>(__r._M_ptr)),
618 _M_refcount(__r._M_refcount)
621 _M_refcount = __shared_count<_Lp>();
624 template<
typename _Tp1>
626 operator=(
const __shared_ptr<_Tp1, _Lp>& __r)
629 _M_refcount = __r._M_refcount;
633 #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
634 template<
typename _Tp1>
636 operator=(std::auto_ptr<_Tp1>& __r)
638 __shared_ptr(__r).swap(*
this);
645 { __shared_ptr().swap(*
this); }
647 template<
typename _Tp1>
653 __shared_ptr(__p).swap(*
this);
656 template<
typename _Tp1,
typename _Deleter>
658 reset(_Tp1* __p, _Deleter __d)
659 { __shared_ptr(__p, __d).swap(*
this); }
662 typename std::tr1::add_reference<_Tp>::type
682 typedef _Tp* __shared_ptr::*__unspecified_bool_type;
685 operator __unspecified_bool_type() const
686 {
return _M_ptr == 0 ? 0 : &__shared_ptr::_M_ptr; }
690 {
return _M_refcount._M_unique(); }
694 {
return _M_refcount._M_get_use_count(); }
697 swap(__shared_ptr<_Tp, _Lp>& __other)
700 _M_refcount._M_swap(__other._M_refcount);
706 {
return _M_refcount._M_get_deleter(__ti); }
708 template<
typename _Tp1, _Lock_policy _Lp1>
710 _M_less(
const __shared_ptr<_Tp1, _Lp1>& __rhs)
const
711 {
return _M_refcount < __rhs._M_refcount; }
713 template<
typename _Tp1, _Lock_policy _Lp1>
friend class __shared_ptr;
714 template<
typename _Tp1, _Lock_policy _Lp1>
friend class __weak_ptr;
716 template<
typename _Del,
typename _Tp1, _Lock_policy _Lp1>
717 friend _Del* get_deleter(
const __shared_ptr<_Tp1, _Lp1>&);
720 template<
typename _Tp1>
722 operator==(
const __shared_ptr& __a,
const __shared_ptr<_Tp1, _Lp>& __b)
723 {
return __a.get() == __b.get(); }
725 template<
typename _Tp1>
727 operator!=(
const __shared_ptr& __a,
const __shared_ptr<_Tp1, _Lp>& __b)
728 {
return __a.get() != __b.get(); }
730 template<
typename _Tp1>
732 operator<(const __shared_ptr& __a, const __shared_ptr<_Tp1, _Lp>& __b)
733 {
return __a._M_less(__b); }
736 __shared_count<_Lp> _M_refcount;
740 template<
typename _Tp, _Lock_policy _Lp>
742 swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
751 template<
typename _Tp,
typename _Tp1, _Lock_policy _Lp>
752 inline __shared_ptr<_Tp, _Lp>
753 static_pointer_cast(
const __shared_ptr<_Tp1, _Lp>& __r)
754 {
return __shared_ptr<_Tp, _Lp>(__r, __static_cast_tag()); }
761 template<
typename _Tp,
typename _Tp1, _Lock_policy _Lp>
762 inline __shared_ptr<_Tp, _Lp>
763 const_pointer_cast(
const __shared_ptr<_Tp1, _Lp>& __r)
764 {
return __shared_ptr<_Tp, _Lp>(__r, __const_cast_tag()); }
771 template<
typename _Tp,
typename _Tp1, _Lock_policy _Lp>
772 inline __shared_ptr<_Tp, _Lp>
773 dynamic_pointer_cast(
const __shared_ptr<_Tp1, _Lp>& __r)
774 {
return __shared_ptr<_Tp, _Lp>(__r, __dynamic_cast_tag()); }
777 template<
typename _Ch,
typename _Tr,
typename _Tp, _Lock_policy _Lp>
778 std::basic_ostream<_Ch, _Tr>&
779 operator<<(std::basic_ostream<_Ch, _Tr>& __os,
780 const __shared_ptr<_Tp, _Lp>& __p)
787 template<
typename _Del,
typename _Tp, _Lock_policy _Lp>
789 get_deleter(
const __shared_ptr<_Tp, _Lp>& __p)
792 return static_cast<_Del*
>(__p._M_get_deleter(
typeid(_Del)));
799 template<
typename _Tp, _Lock_policy _Lp>
803 typedef _Tp element_type;
806 : _M_ptr(0), _M_refcount()
825 template<
typename _Tp1>
826 __weak_ptr(
const __weak_ptr<_Tp1, _Lp>& __r)
827 : _M_refcount(__r._M_refcount)
830 _M_ptr = __r.lock().get();
833 template<typename _Tp1>
834 __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
835 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
838 template<
typename _Tp1>
840 operator=(
const __weak_ptr<_Tp1, _Lp>& __r)
842 _M_ptr = __r.lock().get();
843 _M_refcount = __r._M_refcount;
847 template<
typename _Tp1>
849 operator=(
const __shared_ptr<_Tp1, _Lp>& __r)
852 _M_refcount = __r._M_refcount;
856 __shared_ptr<_Tp, _Lp>
862 return __shared_ptr<element_type, _Lp>();
866 return __shared_ptr<element_type, _Lp>(*this);
873 return __shared_ptr<element_type, _Lp>();
878 return expired() ? __shared_ptr<element_type, _Lp>()
879 : __shared_ptr<element_type, _Lp>(*
this);
886 {
return _M_refcount._M_get_use_count(); }
890 {
return _M_refcount._M_get_use_count() == 0; }
894 { __weak_ptr().swap(*
this); }
897 swap(__weak_ptr& __s)
900 _M_refcount._M_swap(__s._M_refcount);
906 _M_assign(_Tp* __ptr,
const __shared_count<_Lp>& __refcount)
909 _M_refcount = __refcount;
912 template<
typename _Tp1>
914 _M_less(
const __weak_ptr<_Tp1, _Lp>& __rhs)
const
915 {
return _M_refcount < __rhs._M_refcount; }
917 template<
typename _Tp1, _Lock_policy _Lp1>
friend class __shared_ptr;
918 template<
typename _Tp1, _Lock_policy _Lp1>
friend class __weak_ptr;
919 friend class __enable_shared_from_this<_Tp, _Lp>;
920 friend class enable_shared_from_this<_Tp>;
923 template<
typename _Tp1>
925 operator<(const __weak_ptr& __lhs, const __weak_ptr<_Tp1, _Lp>& __rhs)
926 {
return __lhs._M_less(__rhs); }
929 __weak_count<_Lp> _M_refcount;
933 template<
typename _Tp, _Lock_policy _Lp>
935 swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b)
939 template<
typename _Tp, _Lock_policy _Lp>
940 class __enable_shared_from_this
943 __enable_shared_from_this() { }
945 __enable_shared_from_this(
const __enable_shared_from_this&) { }
947 __enable_shared_from_this&
948 operator=(
const __enable_shared_from_this&)
951 ~__enable_shared_from_this() { }
954 __shared_ptr<_Tp, _Lp>
956 {
return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
958 __shared_ptr<const _Tp, _Lp>
959 shared_from_this()
const
960 {
return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
963 template<
typename _Tp1>
965 _M_weak_assign(_Tp1* __p,
const __shared_count<_Lp>& __n)
const
966 { _M_weak_this._M_assign(__p, __n); }
968 template<
typename _Tp1>
970 __enable_shared_from_this_helper(
const __shared_count<_Lp>& __pn,
971 const __enable_shared_from_this* __pe,
975 __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
978 mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
984 template<
typename _Tp>
986 :
public __shared_ptr<_Tp>
990 : __shared_ptr<_Tp>() { }
992 template<
typename _Tp1>
994 shared_ptr(_Tp1* __p)
995 : __shared_ptr<_Tp>(__p) { }
997 template<
typename _Tp1,
typename _Deleter>
998 shared_ptr(_Tp1* __p, _Deleter __d)
999 : __shared_ptr<_Tp>(__p, __d) { }
1001 template<
typename _Tp1>
1002 shared_ptr(
const shared_ptr<_Tp1>& __r)
1003 : __shared_ptr<_Tp>(__r) { }
1005 template<
typename _Tp1>
1007 shared_ptr(
const weak_ptr<_Tp1>& __r)
1008 : __shared_ptr<_Tp>(__r) { }
1010 #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
1011 template<
typename _Tp1>
1013 shared_ptr(std::auto_ptr<_Tp1>& __r)
1014 : __shared_ptr<_Tp>(__r) { }
1017 template<
typename _Tp1>
1018 shared_ptr(
const shared_ptr<_Tp1>& __r, __static_cast_tag)
1019 : __shared_ptr<_Tp>(__r, __static_cast_tag()) { }
1021 template<
typename _Tp1>
1022 shared_ptr(
const shared_ptr<_Tp1>& __r, __const_cast_tag)
1023 : __shared_ptr<_Tp>(__r, __const_cast_tag()) { }
1025 template<
typename _Tp1>
1026 shared_ptr(
const shared_ptr<_Tp1>& __r, __dynamic_cast_tag)
1027 : __shared_ptr<_Tp>(__r, __dynamic_cast_tag()) { }
1029 template<
typename _Tp1>
1031 operator=(
const shared_ptr<_Tp1>& __r)
1033 this->__shared_ptr<_Tp>::operator=(__r);
1037 #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
1038 template<
typename _Tp1>
1040 operator=(std::auto_ptr<_Tp1>& __r)
1042 this->__shared_ptr<_Tp>::operator=(__r);
1049 template<
typename _Tp>
1051 swap(__shared_ptr<_Tp>& __a, __shared_ptr<_Tp>& __b)
1054 template<
typename _Tp,
typename _Tp1>
1055 inline shared_ptr<_Tp>
1056 static_pointer_cast(
const shared_ptr<_Tp1>& __r)
1057 {
return shared_ptr<_Tp>(__r, __static_cast_tag()); }
1059 template<
typename _Tp,
typename _Tp1>
1060 inline shared_ptr<_Tp>
1061 const_pointer_cast(
const shared_ptr<_Tp1>& __r)
1062 {
return shared_ptr<_Tp>(__r, __const_cast_tag()); }
1064 template<
typename _Tp,
typename _Tp1>
1065 inline shared_ptr<_Tp>
1066 dynamic_pointer_cast(
const shared_ptr<_Tp1>& __r)
1067 {
return shared_ptr<_Tp>(__r, __dynamic_cast_tag()); }
1072 template<
typename _Tp>
1074 :
public __weak_ptr<_Tp>
1078 : __weak_ptr<_Tp>() { }
1080 template<
typename _Tp1>
1081 weak_ptr(
const weak_ptr<_Tp1>& __r)
1082 : __weak_ptr<_Tp>(__r) { }
1084 template<
typename _Tp1>
1085 weak_ptr(
const shared_ptr<_Tp1>& __r)
1086 : __weak_ptr<_Tp>(__r) { }
1088 template<
typename _Tp1>
1090 operator=(
const weak_ptr<_Tp1>& __r)
1092 this->__weak_ptr<_Tp>::operator=(__r);
1096 template<
typename _Tp1>
1098 operator=(
const shared_ptr<_Tp1>& __r)
1100 this->__weak_ptr<_Tp>::operator=(__r);
1108 if (this->expired())
1109 return shared_ptr<_Tp>();
1113 return shared_ptr<_Tp>(*this);
1117 return shared_ptr<_Tp>();
1120 return this->expired() ? shared_ptr<_Tp>()
1121 : shared_ptr<_Tp>(*
this);
1126 template<
typename _Tp>
1127 class enable_shared_from_this
1130 enable_shared_from_this() { }
1132 enable_shared_from_this(
const enable_shared_from_this&) { }
1134 enable_shared_from_this&
1135 operator=(
const enable_shared_from_this&)
1138 ~enable_shared_from_this() { }
1143 {
return shared_ptr<_Tp>(this->_M_weak_this); }
1145 shared_ptr<const _Tp>
1146 shared_from_this()
const
1147 {
return shared_ptr<const _Tp>(this->_M_weak_this); }
1150 template<
typename _Tp1>
1152 _M_weak_assign(_Tp1* __p,
const __shared_count<>& __n)
const
1153 { _M_weak_this._M_assign(__p, __n); }
1155 template<
typename _Tp1>
1157 __enable_shared_from_this_helper(
const __shared_count<>& __pn,
1158 const enable_shared_from_this* __pe,
1162 __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
1165 mutable weak_ptr<_Tp> _M_weak_this;
1168 _GLIBCXX_END_NAMESPACE_VERSION
1172 #endif // _TR1_SHARED_PTR_H
#define __glibcxx_function_requires(...)
Definition: concept_check.h:47
bool operator==(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))
#define __try
Definition: exception_defines.h:35
Part of RTTI.
Definition: typeinfo:88
#define _GLIBCXX_DEBUG_ASSERT(_Condition)
Definition: debug.h:61
#define __throw_exception_again
Definition: exception_defines.h:37
bool operator<(const _Safe_iterator< _IteratorL, _Sequence > &__lhs, const _Safe_iterator< _IteratorR, _Sequence > &__rhs)
Definition: safe_iterator.h:548
namespace std _GLIBCXX_VISIBILITY(default)
Definition: auto_ptr.h:36
#define _GLIBCXX_READ_MEM_BARRIER
Definition: atomicity.h:111
bool operator!=(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))
#define __catch(X)
Definition: exception_defines.h:36
#define _GLIBCXX_WRITE_MEM_BARRIER
Definition: atomicity.h:114
void swap(exception_ptr &__lhs, exception_ptr &__rhs)
Definition: exception_ptr.h:160