Lines Matching refs:shared_ptr
558 class shared_ptr
566 constexpr shared_ptr() noexcept;
567 template<class Y> explicit shared_ptr(Y* p);
568 template<class Y, class D> shared_ptr(Y* p, D d);
569 template<class Y, class D, class A> shared_ptr(Y* p, D d, A a);
570 template <class D> shared_ptr(nullptr_t p, D d);
571 template <class D, class A> shared_ptr(nullptr_t p, D d, A a);
572 template<class Y> shared_ptr(const shared_ptr<Y>& r, T *p) noexcept;
573 shared_ptr(const shared_ptr& r) noexcept;
574 template<class Y> shared_ptr(const shared_ptr<Y>& r) noexcept;
575 shared_ptr(shared_ptr&& r) noexcept;
576 template<class Y> shared_ptr(shared_ptr<Y>&& r) noexcept;
577 template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
578 template<class Y> shared_ptr(auto_ptr<Y>&& r); // removed in C++17
579 template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);
580 shared_ptr(nullptr_t) : shared_ptr() { }
583 ~shared_ptr();
586 shared_ptr& operator=(const shared_ptr& r) noexcept;
587 template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
588 shared_ptr& operator=(shared_ptr&& r) noexcept;
589 template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);
590 template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r); // removed in C++17
591 template <class Y, class D> shared_ptr& operator=(unique_ptr<Y, D>&& r);
594 void swap(shared_ptr& r) noexcept;
607 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
612 shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
614 shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;
616 // shared_ptr comparisons:
618 bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
620 bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
622 bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
624 bool operator>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
626 bool operator<=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
628 bool operator>=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
631 bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
633 bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept;
635 bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept;
637 bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept;
639 bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept;
641 bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept;
643 bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept;
645 bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept;
647 bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept;
649 bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept;
651 bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept;
653 bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept;
655 // shared_ptr specialized algorithms:
656 template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
658 // shared_ptr casts:
660 shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r) noexcept;
662 shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r) noexcept;
664 shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r) noexcept;
666 // shared_ptr I/O:
668 basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);
670 // shared_ptr get_deleter:
671 template<class D, class T> D* get_deleter(shared_ptr<T> const& p) noexcept;
674 shared_ptr<T> make_shared(Args&&... args); // T is not an array
676 shared_ptr<T> allocate_shared(const A& a, Args&&... args); // T is not an array
679 shared_ptr<T> make_shared(size_t N); // T is U[] (since C++20)
681 shared_ptr<T> allocate_shared(const A& a, size_t N); // T is U[] (since C++20)
684 shared_ptr<T> make_shared(); // T is U[N] (since C++20)
686 shared_ptr<T> allocate_shared(const A& a); // T is U[N] (since C++20)
689 shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // T is U[] (since C++20)
691 …shared_ptr<T> allocate_shared(const A& a, size_t N, const remove_extent_t<T>& u); // T is U[] (sin…
693 template<class T> shared_ptr<T>
696 … shared_ptr<T> allocate_shared(const A& a, const remove_extent_t<T>& u); // T is U[N] (since C++20)
707 template<class Y> weak_ptr(shared_ptr<Y> const& r) noexcept;
719 template<class Y> weak_ptr& operator=(shared_ptr<Y> const& r) noexcept;
730 shared_ptr<T> lock() const noexcept;
731 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
736 weak_ptr(shared_ptr<T>) -> weak_ptr<T>;
745 struct owner_less<shared_ptr<T> >
746 : binary_function<shared_ptr<T>, shared_ptr<T>, bool>
749 bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const noexcept;
750 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
751 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
760 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
761 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
768 bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
770 bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept;
772 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
788 shared_ptr<T> shared_from_this();
789 shared_ptr<T const> shared_from_this() const;
793 bool atomic_is_lock_free(const shared_ptr<T>* p);
795 shared_ptr<T> atomic_load(const shared_ptr<T>* p);
797 shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
799 void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
801 void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
803 shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
805 shared_ptr<T>
806 atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
809 atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
812 atomic_compare_exchange_strong( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
815 atomic_compare_exchange_weak_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
816 shared_ptr<T> w, memory_order success,
820 atomic_compare_exchange_strong_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
821 shared_ptr<T> w, memory_order success,
826 template <class T> struct hash<shared_ptr<T> >;
860 #include <__memory/shared_ptr.h>