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> >;
3761 class _LIBCPP_TYPE_VIS_ONLY shared_ptr
3771 _LIBCPP_CONSTEXPR shared_ptr() _NOEXCEPT;
3772 _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT;
3774 explicit shared_ptr(_Yp* __p,
3777 shared_ptr(_Yp* __p, _Dp __d,
3780 shared_ptr(_Yp* __p, _Dp __d, _Alloc __a,
3782 template <class _Dp> shared_ptr(nullptr_t __p, _Dp __d);
3783 template <class _Dp, class _Alloc> shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a);
3784 template<class _Yp> shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) _NOEXCEPT;
3785 shared_ptr(const shared_ptr& __r) _NOEXCEPT;
3787 shared_ptr(const shared_ptr<_Yp>& __r,
3791 shared_ptr(shared_ptr&& __r) _NOEXCEPT;
3792 template<class _Yp> shared_ptr(shared_ptr<_Yp>&& __r,
3796 template<class _Yp> explicit shared_ptr(const weak_ptr<_Yp>& __r,
3800 shared_ptr(auto_ptr<_Yp>&& __r,
3804 shared_ptr(auto_ptr<_Yp> __r,
3809 shared_ptr(unique_ptr<_Yp, _Dp>&&,
3818 shared_ptr(unique_ptr<_Yp, _Dp>&&,
3828 shared_ptr(unique_ptr<_Yp, _Dp>,
3837 shared_ptr(unique_ptr<_Yp, _Dp>,
3847 ~shared_ptr();
3849 shared_ptr& operator=(const shared_ptr& __r) _NOEXCEPT;
3854 shared_ptr&
3856 operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT;
3858 shared_ptr& operator=(shared_ptr&& __r) _NOEXCEPT;
3863 shared_ptr<_Tp>&
3865 operator=(shared_ptr<_Yp>&& __r);
3871 shared_ptr
3880 shared_ptr&
3889 shared_ptr&
3897 void swap(shared_ptr& __r) _NOEXCEPT;
3936 bool owner_before(shared_ptr<_Up> const& __p) const
3944 __owner_equivalent(const shared_ptr& __p) const
3958 shared_ptr<_Tp>
3963 shared_ptr<_Tp>
3968 static shared_ptr<_Tp> make_shared();
3971 static shared_ptr<_Tp> make_shared(_A0&);
3974 static shared_ptr<_Tp> make_shared(_A0&, _A1&);
3977 static shared_ptr<_Tp> make_shared(_A0&, _A1&, _A2&);
3980 static shared_ptr<_Tp>
3984 static shared_ptr<_Tp>
3988 static shared_ptr<_Tp>
3992 static shared_ptr<_Tp>
4011 template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY shared_ptr;
4018 shared_ptr<_Tp>::shared_ptr() _NOEXCEPT
4027 shared_ptr<_Tp>::shared_ptr(nullptr_t) _NOEXCEPT
4035 shared_ptr<_Tp>::shared_ptr(_Yp* __p,
4048 shared_ptr<_Tp>::shared_ptr(_Yp* __p, _Dp __d,
4071 shared_ptr<_Tp>::shared_ptr(nullptr_t __p, _Dp __d)
4092 shared_ptr<_Tp>::shared_ptr(_Yp* __p, _Dp __d, _Alloc __a,
4121 shared_ptr<_Tp>::shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a)
4149 shared_ptr<_Tp>::shared_ptr(const shared_ptr<_Yp>& __r, element_type *__p) _NOEXCEPT
4159 shared_ptr<_Tp>::shared_ptr(const shared_ptr& __r) _NOEXCEPT
4170 shared_ptr<_Tp>::shared_ptr(const shared_ptr<_Yp>& __r,
4184 shared_ptr<_Tp>::shared_ptr(shared_ptr&& __r) _NOEXCEPT
4195 shared_ptr<_Tp>::shared_ptr(shared_ptr<_Yp>&& __r,
4210 shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp>&& __r,
4212 shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp> __r,
4226 shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r,
4228 shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r,
4248 shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r,
4250 shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r,
4273 shared_ptr<_Tp>
4274 shared_ptr<_Tp>::make_shared(_Args&& ...__args)
4282 shared_ptr<_Tp> __r;
4291 shared_ptr<_Tp>
4292 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _Args&& ...__args)
4301 shared_ptr<_Tp> __r;
4311 shared_ptr<_Tp>
4312 shared_ptr<_Tp>::make_shared()
4320 shared_ptr<_Tp> __r;
4329 shared_ptr<_Tp>
4330 shared_ptr<_Tp>::make_shared(_A0& __a0)
4338 shared_ptr<_Tp> __r;
4347 shared_ptr<_Tp>
4348 shared_ptr<_Tp>::make_shared(_A0& __a0, _A1& __a1)
4356 shared_ptr<_Tp> __r;
4365 shared_ptr<_Tp>
4366 shared_ptr<_Tp>::make_shared(_A0& __a0, _A1& __a1, _A2& __a2)
4374 shared_ptr<_Tp> __r;
4383 shared_ptr<_Tp>
4384 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a)
4393 shared_ptr<_Tp> __r;
4402 shared_ptr<_Tp>
4403 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0)
4412 shared_ptr<_Tp> __r;
4421 shared_ptr<_Tp>
4422 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0, _A1& __a1)
4431 shared_ptr<_Tp> __r;
4440 shared_ptr<_Tp>
4441 shared_ptr<_Tp>::allocate_shared(const _Alloc& __a, _A0& __a0, _A1& __a1, _A2& __a2)
4450 shared_ptr<_Tp> __r;
4460 shared_ptr<_Tp>::~shared_ptr()
4468 shared_ptr<_Tp>&
4469 shared_ptr<_Tp>::operator=(const shared_ptr& __r) _NOEXCEPT
4471 shared_ptr(__r).swap(*this);
4481 shared_ptr<_Tp>&
4483 shared_ptr<_Tp>::operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT
4485 shared_ptr(__r).swap(*this);
4493 shared_ptr<_Tp>&
4494 shared_ptr<_Tp>::operator=(shared_ptr&& __r) _NOEXCEPT
4496 shared_ptr(_VSTD::move(__r)).swap(*this);
4506 shared_ptr<_Tp>&
4508 shared_ptr<_Tp>::operator=(shared_ptr<_Yp>&& __r)
4510 shared_ptr(_VSTD::move(__r)).swap(*this);
4521 shared_ptr<_Tp>
4523 shared_ptr<_Tp>::operator=(auto_ptr<_Yp>&& __r)
4525 shared_ptr(_VSTD::move(__r)).swap(*this);
4536 shared_ptr<_Tp>&
4538 shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp>&& __r)
4540 shared_ptr(_VSTD::move(__r)).swap(*this);
4553 shared_ptr<_Tp>&
4555 shared_ptr<_Tp>::operator=(auto_ptr<_Yp> __r)
4557 shared_ptr(__r).swap(*this);
4568 shared_ptr<_Tp>&
4570 shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp> __r)
4572 shared_ptr(_VSTD::move(__r)).swap(*this);
4581 shared_ptr<_Tp>::swap(shared_ptr& __r) _NOEXCEPT
4590 shared_ptr<_Tp>::reset() _NOEXCEPT
4592 shared_ptr().swap(*this);
4603 shared_ptr<_Tp>::reset(_Yp* __p)
4605 shared_ptr(__p).swap(*this);
4616 shared_ptr<_Tp>::reset(_Yp* __p, _Dp __d)
4618 shared_ptr(__p, __d).swap(*this);
4629 shared_ptr<_Tp>::reset(_Yp* __p, _Dp __d, _Alloc __a)
4631 shared_ptr(__p, __d, __a).swap(*this);
4641 shared_ptr<_Tp>
4645 return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
4653 shared_ptr<_Tp>
4657 return shared_ptr<_Tp>::allocate_shared(__a, _VSTD::forward<_Args>(__args)...);
4664 shared_ptr<_Tp>
4667 return shared_ptr<_Tp>::make_shared();
4672 shared_ptr<_Tp>
4675 return shared_ptr<_Tp>::make_shared(__a0);
4680 shared_ptr<_Tp>
4683 return shared_ptr<_Tp>::make_shared(__a0, __a1);
4688 shared_ptr<_Tp>
4691 return shared_ptr<_Tp>::make_shared(__a0, __a1, __a2);
4696 shared_ptr<_Tp>
4699 return shared_ptr<_Tp>::allocate_shared(__a);
4704 shared_ptr<_Tp>
4707 return shared_ptr<_Tp>::allocate_shared(__a, __a0);
4712 shared_ptr<_Tp>
4715 return shared_ptr<_Tp>::allocate_shared(__a, __a0, __a1);
4720 shared_ptr<_Tp>
4723 return shared_ptr<_Tp>::allocate_shared(__a, __a0, __a1, __a2);
4731 operator==(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4739 operator!=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4747 operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4756 operator>(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4764 operator<=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4772 operator>=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
4780 operator==(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4788 operator==(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4796 operator!=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4804 operator!=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4812 operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4820 operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4828 operator>(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4836 operator>(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4844 operator<=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4852 operator<=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4860 operator>=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
4868 operator>=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
4876 swap(shared_ptr<_Tp>& __x, shared_ptr<_Tp>& __y) _NOEXCEPT
4886 shared_ptr<_Tp>
4888 static_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
4890 return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get()));
4898 shared_ptr<_Tp>
4900 dynamic_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
4903 return __p ? shared_ptr<_Tp>(__r, __p) : shared_ptr<_Tp>();
4910 shared_ptr<_Tp>
4912 const_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
4915 return shared_ptr<_Tp>(__r, const_cast<_RTp*>(__r.get()));
4923 get_deleter(const shared_ptr<_Tp>& __p) _NOEXCEPT
4941 template<class _Yp> weak_ptr(shared_ptr<_Yp> const& __r,
4985 operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT;
4996 shared_ptr<_Tp> lock() const _NOEXCEPT;
4999 bool owner_before(const shared_ptr<_Up>& __r) const
5007 template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY shared_ptr;
5032 weak_ptr<_Tp>::weak_ptr(shared_ptr<_Yp> const& __r,
5147 weak_ptr<_Tp>::operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT
5180 shared_ptr<_Tp>::shared_ptr(const weak_ptr<_Yp>& __r,
5194 shared_ptr<_Tp>
5197 shared_ptr<_Tp> __r;
5207 struct _LIBCPP_TYPE_VIS_ONLY owner_less<shared_ptr<_Tp> >
5208 : binary_function<shared_ptr<_Tp>, shared_ptr<_Tp>, bool>
5212 bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
5215 bool operator()(shared_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const
5218 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
5231 bool operator()(shared_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const
5234 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const
5254 shared_ptr<_Tp> shared_from_this()
5255 {return shared_ptr<_Tp>(__weak_this_);}
5257 shared_ptr<_Tp const> shared_from_this() const
5258 {return shared_ptr<const _Tp>(__weak_this_);}
5260 template <class _Up> friend class shared_ptr;
5264 struct _LIBCPP_TYPE_VIS_ONLY hash<shared_ptr<_Tp> >
5266 typedef shared_ptr<_Tp> argument_type;
5278 operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
5302 atomic_is_lock_free(const shared_ptr<_Tp>*)
5308 shared_ptr<_Tp>
5309 atomic_load(const shared_ptr<_Tp>* __p)
5313 shared_ptr<_Tp> __q = *__p;
5320 shared_ptr<_Tp>
5321 atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
5328 atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
5339 atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
5345 shared_ptr<_Tp>
5346 atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
5357 shared_ptr<_Tp>
5358 atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
5365 atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
5383 atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
5391 atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
5392 shared_ptr<_Tp> __w, memory_order, memory_order)
5400 atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
5401 shared_ptr<_Tp> __w, memory_order, memory_order)