Lines Matching refs:shared_ptr
358 class shared_ptr
364 constexpr shared_ptr() noexcept;
365 template<class Y> explicit shared_ptr(Y* p);
366 template<class Y, class D> shared_ptr(Y* p, D d);
367 template<class Y, class D, class A> shared_ptr(Y* p, D d, A a);
368 template <class D> shared_ptr(nullptr_t p, D d);
369 template <class D, class A> shared_ptr(nullptr_t p, D d, A a);
370 template<class Y> shared_ptr(const shared_ptr<Y>& r, T *p) noexcept;
371 shared_ptr(const shared_ptr& r) noexcept;
372 template<class Y> shared_ptr(const shared_ptr<Y>& r) noexcept;
373 shared_ptr(shared_ptr&& r) noexcept;
374 template<class Y> shared_ptr(shared_ptr<Y>&& r) noexcept;
375 template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
376 template<class Y> shared_ptr(auto_ptr<Y>&& r);
377 template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);
378 shared_ptr(nullptr_t) : shared_ptr() { }
381 ~shared_ptr();
384 shared_ptr& operator=(const shared_ptr& r) noexcept;
385 template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
386 shared_ptr& operator=(shared_ptr&& r) noexcept;
387 template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);
388 template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r);
389 template <class Y, class D> shared_ptr& operator=(unique_ptr<Y, D>&& r);
392 void swap(shared_ptr& r) noexcept;
405 template<class U> bool owner_before(shared_ptr<U> const& b) const;
409 // shared_ptr comparisons:
411 bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
413 bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
415 bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
417 bool operator>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
419 bool operator<=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
421 bool operator>=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
424 bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
426 bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept;
428 bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept;
430 bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept;
432 bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept;
434 bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept;
436 bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept;
438 bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept;
440 bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept;
442 bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept;
444 bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept;
446 bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept;
448 // shared_ptr specialized algorithms:
449 template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
451 // shared_ptr casts:
453 shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r) noexcept;
455 shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r) noexcept;
457 shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r) noexcept;
459 // shared_ptr I/O:
461 basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);
463 // shared_ptr get_deleter:
464 template<class D, class T> D* get_deleter(shared_ptr<T> const& p) noexcept;
467 shared_ptr<T> make_shared(Args&&... args);
469 shared_ptr<T> allocate_shared(const A& a, Args&&... args);
479 template<class Y> weak_ptr(shared_ptr<Y> const& r) noexcept;
491 template<class Y> weak_ptr& operator=(shared_ptr<Y> const& r) noexcept;
502 shared_ptr<T> lock() const noexcept;
503 template<class U> bool owner_before(shared_ptr<U> const& b) const;
514 struct owner_less<shared_ptr<T>>
515 : binary_function<shared_ptr<T>, shared_ptr<T>, bool>
518 bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const;
519 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const;
520 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const;
529 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const;
530 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const;
542 shared_ptr<T> shared_from_this();
543 shared_ptr<T const> shared_from_this() const;
547 bool atomic_is_lock_free(const shared_ptr<T>* p);
549 shared_ptr<T> atomic_load(const shared_ptr<T>* p);
551 shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
553 void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
555 void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
557 shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
559 shared_ptr<T>
560 atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
563 atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
566 atomic_compare_exchange_strong( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
569 atomic_compare_exchange_weak_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
570 shared_ptr<T> w, memory_order success,
574 atomic_compare_exchange_strong_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
575 shared_ptr<T> w, memory_order success,
580 template <class T> struct hash<shared_ptr<T> >;
3760 class _LIBCPP_TYPE_VIS_ONLY shared_ptr
3770 _LIBCPP_CONSTEXPR shared_ptr() _NOEXCEPT;
3771 _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT;
3773 explicit shared_ptr(_Yp* __p,
3776 shared_ptr(_Yp* __p, _Dp __d,
3779 shared_ptr(_Yp* __p, _Dp __d, _Alloc __a,
3781 template <class _Dp> shared_ptr(nullptr_t __p, _Dp __d);
3782 template <class _Dp, class _Alloc> shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a);
3783 template<class _Yp> shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) _NOEXCEPT;
3784 shared_ptr(const shared_ptr& __r) _NOEXCEPT;
3786 shared_ptr(const shared_ptr<_Yp>& __r,
3790 shared_ptr(shared_ptr&& __r) _NOEXCEPT;
3791 template<class _Yp> shared_ptr(shared_ptr<_Yp>&& __r,
3795 template<class _Yp> explicit shared_ptr(const weak_ptr<_Yp>& __r,
3799 shared_ptr(auto_ptr<_Yp>&& __r,
3803 shared_ptr(auto_ptr<_Yp> __r,
3808 shared_ptr(unique_ptr<_Yp, _Dp>&&,
3817 shared_ptr(unique_ptr<_Yp, _Dp>&&,
3827 shared_ptr(unique_ptr<_Yp, _Dp>,
3836 shared_ptr(unique_ptr<_Yp, _Dp>,
3846 ~shared_ptr();
3848 shared_ptr& operator=(const shared_ptr& __r) _NOEXCEPT;
3853 shared_ptr&
3855 operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT;
3857 shared_ptr& operator=(shared_ptr&& __r) _NOEXCEPT;
3862 shared_ptr<_Tp>&
3864 operator=(shared_ptr<_Yp>&& __r);
3870 shared_ptr
3879 shared_ptr&
3888 shared_ptr&
3896 void swap(shared_ptr& __r) _NOEXCEPT;
3935 bool owner_before(shared_ptr<_Up> const& __p) const
3943 __owner_equivalent(const shared_ptr& __p) const
3957 shared_ptr<_Tp>
3962 shared_ptr<_Tp>
3967 static shared_ptr<_Tp> make_shared();
3970 static shared_ptr<_Tp> make_shared(_A0&);
3973 static shared_ptr<_Tp> make_shared(_A0&, _A1&);
3976 static shared_ptr<_Tp> make_shared(_A0&, _A1&, _A2&);
3979 static shared_ptr<_Tp>
3983 static shared_ptr<_Tp>
3987 static shared_ptr<_Tp>
3991 static shared_ptr<_Tp>
4010 template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY shared_ptr;
4017 shared_ptr<_Tp>::shared_ptr() _NOEXCEPT
4026 shared_ptr<_Tp>::shared_ptr(nullptr_t) _NOEXCEPT
4034 shared_ptr<_Tp>::shared_ptr(_Yp* __p,
4047 shared_ptr<_Tp>::shared_ptr(_Yp* __p, _Dp __d,
4070 shared_ptr<_Tp>::shared_ptr(nullptr_t __p, _Dp __d)
4091 shared_ptr<_Tp>::shared_ptr(_Yp* __p, _Dp __d, _Alloc __a,
4120 shared_ptr<_Tp>::shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a)
4148 shared_ptr<_Tp>::shared_ptr(const shared_ptr<_Yp>& __r, element_type *__p) _NOEXCEPT
4158 shared_ptr<_Tp>::shared_ptr(const shared_ptr& __r) _NOEXCEPT
4169 shared_ptr<_Tp>::shared_ptr(const shared_ptr<_Yp>& __r,
4183 shared_ptr<_Tp>::shared_ptr(shared_ptr&& __r) _NOEXCEPT
4194 shared_ptr<_Tp>::shared_ptr(shared_ptr<_Yp>&& __r,
4209 shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp>&& __r,
4211 shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp> __r,
4225 shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r,
4227 shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r,
4247 shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r,
4249 shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r,
4272 shared_ptr<_Tp>
4273 shared_ptr<_Tp>::make_shared(_Args&& ...__args)
4281 shared_ptr<_Tp> __r;
4290 shared_ptr<_Tp>
4291 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _Args&& ...__args)
4300 shared_ptr<_Tp> __r;
4310 shared_ptr<_Tp>
4311 shared_ptr<_Tp>::make_shared()
4319 shared_ptr<_Tp> __r;
4328 shared_ptr<_Tp>
4329 shared_ptr<_Tp>::make_shared(_A0& __a0)
4337 shared_ptr<_Tp> __r;
4346 shared_ptr<_Tp>
4347 shared_ptr<_Tp>::make_shared(_A0& __a0, _A1& __a1)
4355 shared_ptr<_Tp> __r;
4364 shared_ptr<_Tp>
4365 shared_ptr<_Tp>::make_shared(_A0& __a0, _A1& __a1, _A2& __a2)
4373 shared_ptr<_Tp> __r;
4382 shared_ptr<_Tp>
4383 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a)
4392 shared_ptr<_Tp> __r;
4401 shared_ptr<_Tp>
4402 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0)
4411 shared_ptr<_Tp> __r;
4420 shared_ptr<_Tp>
4421 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0, _A1& __a1)
4430 shared_ptr<_Tp> __r;
4439 shared_ptr<_Tp>
4440 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0, _A1& __a1, _A2& __a2)
4449 shared_ptr<_Tp> __r;
4459 shared_ptr<_Tp>::~shared_ptr()
4467 shared_ptr<_Tp>&
4468 shared_ptr<_Tp>::operator=(const shared_ptr& __r) _NOEXCEPT
4470 shared_ptr(__r).swap(*this);
4480 shared_ptr<_Tp>&
4482 shared_ptr<_Tp>::operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT
4484 shared_ptr(__r).swap(*this);
4492 shared_ptr<_Tp>&
4493 shared_ptr<_Tp>::operator=(shared_ptr&& __r) _NOEXCEPT
4495 shared_ptr(_VSTD::move(__r)).swap(*this);
4505 shared_ptr<_Tp>&
4507 shared_ptr<_Tp>::operator=(shared_ptr<_Yp>&& __r)
4509 shared_ptr(_VSTD::move(__r)).swap(*this);
4520 shared_ptr<_Tp>
4522 shared_ptr<_Tp>::operator=(auto_ptr<_Yp>&& __r)
4524 shared_ptr(_VSTD::move(__r)).swap(*this);
4535 shared_ptr<_Tp>&
4537 shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp>&& __r)
4539 shared_ptr(_VSTD::move(__r)).swap(*this);
4552 shared_ptr<_Tp>&
4554 shared_ptr<_Tp>::operator=(auto_ptr<_Yp> __r)
4556 shared_ptr(__r).swap(*this);
4567 shared_ptr<_Tp>&
4569 shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp> __r)
4571 shared_ptr(_VSTD::move(__r)).swap(*this);
4580 shared_ptr<_Tp>::swap(shared_ptr& __r) _NOEXCEPT
4589 shared_ptr<_Tp>::reset() _NOEXCEPT
4591 shared_ptr().swap(*this);
4602 shared_ptr<_Tp>::reset(_Yp* __p)
4604 shared_ptr(__p).swap(*this);
4615 shared_ptr<_Tp>::reset(_Yp* __p, _Dp __d)
4617 shared_ptr(__p, __d).swap(*this);
4628 shared_ptr<_Tp>::reset(_Yp* __p, _Dp __d, _Alloc __a)
4630 shared_ptr(__p, __d, __a).swap(*this);
4640 shared_ptr<_Tp>
4644 return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
4652 shared_ptr<_Tp>
4656 return shared_ptr<_Tp>::allocate_shared(__a, _VSTD::forward<_Args>(__args)...);
4663 shared_ptr<_Tp>
4666 return shared_ptr<_Tp>::make_shared();
4671 shared_ptr<_Tp>
4674 return shared_ptr<_Tp>::make_shared(__a0);
4679 shared_ptr<_Tp>
4682 return shared_ptr<_Tp>::make_shared(__a0, __a1);
4687 shared_ptr<_Tp>
4690 return shared_ptr<_Tp>::make_shared(__a0, __a1, __a2);
4695 shared_ptr<_Tp>
4698 return shared_ptr<_Tp>::allocate_shared(__a);
4703 shared_ptr<_Tp>
4706 return shared_ptr<_Tp>::allocate_shared(__a, __a0);
4711 shared_ptr<_Tp>
4714 return shared_ptr<_Tp>::allocate_shared(__a, __a0, __a1);
4719 shared_ptr<_Tp>
4722 return shared_ptr<_Tp>::allocate_shared(__a, __a0, __a1, __a2);
4730 operator==(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4738 operator!=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4746 operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4755 operator>(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4763 operator<=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4771 operator>=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4779 operator==(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4787 operator==(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4795 operator!=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4803 operator!=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4811 operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4819 operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4827 operator>(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4835 operator>(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4843 operator<=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4851 operator<=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4859 operator>=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4867 operator>=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4875 swap(shared_ptr<_Tp>& __x, shared_ptr<_Tp>& __y) _NOEXCEPT
4885 shared_ptr<_Tp>
4887 static_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
4889 return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get()));
4897 shared_ptr<_Tp>
4899 dynamic_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
4902 return __p ? shared_ptr<_Tp>(__r, __p) : shared_ptr<_Tp>();
4909 shared_ptr<_Tp>
4911 const_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
4914 return shared_ptr<_Tp>(__r, const_cast<_RTp*>(__r.get()));
4922 get_deleter(const shared_ptr<_Tp>& __p) _NOEXCEPT
4940 template<class _Yp> weak_ptr(shared_ptr<_Yp> const& __r,
4984 operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT;
4995 shared_ptr<_Tp> lock() const _NOEXCEPT;
4998 bool owner_before(const shared_ptr<_Up>& __r) const
5006 template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY shared_ptr;
5031 weak_ptr<_Tp>::weak_ptr(shared_ptr<_Yp> const& __r,
5146 weak_ptr<_Tp>::operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT
5179 shared_ptr<_Tp>::shared_ptr(const weak_ptr<_Yp>& __r,
5193 shared_ptr<_Tp>
5196 shared_ptr<_Tp> __r;
5206 struct _LIBCPP_TYPE_VIS_ONLY owner_less<shared_ptr<_Tp> >
5207 : binary_function<shared_ptr<_Tp>, shared_ptr<_Tp>, bool>
5211 bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
5214 bool operator()(shared_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const
5217 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
5230 bool operator()(shared_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const
5233 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
5253 shared_ptr<_Tp> shared_from_this()
5254 {return shared_ptr<_Tp>(__weak_this_);}
5256 shared_ptr<_Tp const> shared_from_this() const
5257 {return shared_ptr<const _Tp>(__weak_this_);}
5259 template <class _Up> friend class shared_ptr;
5263 struct _LIBCPP_TYPE_VIS_ONLY hash<shared_ptr<_Tp> >
5265 typedef shared_ptr<_Tp> argument_type;
5277 operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
5301 atomic_is_lock_free(const shared_ptr<_Tp>*)
5307 shared_ptr<_Tp>
5308 atomic_load(const shared_ptr<_Tp>* __p)
5312 shared_ptr<_Tp> __q = *__p;
5319 shared_ptr<_Tp>
5320 atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
5327 atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
5338 atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
5344 shared_ptr<_Tp>
5345 atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
5356 shared_ptr<_Tp>
5357 atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
5364 atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
5382 atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
5390 atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
5391 shared_ptr<_Tp> __w, memory_order, memory_order)
5399 atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
5400 shared_ptr<_Tp> __w, memory_order, memory_order)