Lines Matching refs:shared_ptr
585 class shared_ptr
593 constexpr shared_ptr() noexcept;
594 template<class Y> explicit shared_ptr(Y* p);
595 template<class Y, class D> shared_ptr(Y* p, D d);
596 template<class Y, class D, class A> shared_ptr(Y* p, D d, A a);
597 template <class D> shared_ptr(nullptr_t p, D d);
598 template <class D, class A> shared_ptr(nullptr_t p, D d, A a);
599 template<class Y> shared_ptr(const shared_ptr<Y>& r, T *p) noexcept;
600 shared_ptr(const shared_ptr& r) noexcept;
601 template<class Y> shared_ptr(const shared_ptr<Y>& r) noexcept;
602 shared_ptr(shared_ptr&& r) noexcept;
603 template<class Y> shared_ptr(shared_ptr<Y>&& r) noexcept;
604 template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
605 template<class Y> shared_ptr(auto_ptr<Y>&& r); // removed in C++17
606 template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);
607 shared_ptr(nullptr_t) : shared_ptr() { }
610 ~shared_ptr();
613 shared_ptr& operator=(const shared_ptr& r) noexcept;
614 template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
615 shared_ptr& operator=(shared_ptr&& r) noexcept;
616 template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);
617 template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r); // removed in C++17
618 template <class Y, class D> shared_ptr& operator=(unique_ptr<Y, D>&& r);
621 void swap(shared_ptr& r) noexcept;
634 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
639 shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
641 shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;
643 // shared_ptr comparisons:
645 bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
647 …bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed…
649 …bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed…
651 …bool operator>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed…
653 …bool operator<=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed…
655 …bool operator>=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed…
657 strong_ordering operator<=>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // C++20
660 bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
662 bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
664 bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
666 bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
668 bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
670 bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
672 bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
674 bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
676 bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
678 bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
680 bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
682 bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
684 strong_ordering operator<=>(shared_ptr<T> const& x, nullptr_t) noexcept; // C++20
686 // shared_ptr specialized algorithms:
687 template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
689 // shared_ptr casts:
691 shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r) noexcept;
693 shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r) noexcept;
695 shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r) noexcept;
697 // shared_ptr I/O:
699 basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);
701 // shared_ptr get_deleter:
702 template<class D, class T> D* get_deleter(shared_ptr<T> const& p) noexcept;
705 shared_ptr<T> make_shared(Args&&... args); // T is not an array
707 shared_ptr<T> allocate_shared(const A& a, Args&&... args); // T is not an array
710 shared_ptr<T> make_shared(size_t N); // T is U[] (since C++20)
712 shared_ptr<T> allocate_shared(const A& a, size_t N); // T is U[] (since C++20)
715 shared_ptr<T> make_shared(); // T is U[N] (since C++20)
717 shared_ptr<T> allocate_shared(const A& a); // T is U[N] (since C++20)
720 shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // T is U[] (since C++20)
722 …shared_ptr<T> allocate_shared(const A& a, size_t N, const remove_extent_t<T>& u); // T is U[] (sin…
724 template<class T> shared_ptr<T>
727 … shared_ptr<T> allocate_shared(const A& a, const remove_extent_t<T>& u); // T is U[N] (since C++20)
730 shared_ptr<T> make_shared_for_overwrite(); // T is not U[], C++20
732 shared_ptr<T> allocate_shared_for_overwrite(const A& a); // T is not U[], C++20
735 shared_ptr<T> make_shared_for_overwrite(size_t N); // T is U[], C++20
737 shared_ptr<T> allocate_shared_for_overwrite(const A& a, size_t N); // T is U[], C++20
748 template<class Y> weak_ptr(shared_ptr<Y> const& r) noexcept;
760 template<class Y> weak_ptr& operator=(shared_ptr<Y> const& r) noexcept;
771 shared_ptr<T> lock() const noexcept;
772 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
777 weak_ptr(shared_ptr<T>) -> weak_ptr<T>;
786 struct owner_less<shared_ptr<T> >
787 : binary_function<shared_ptr<T>, shared_ptr<T>, bool>
790 bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const noexcept;
791 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
792 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
801 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
802 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
809 bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
811 bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept;
813 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
829 shared_ptr<T> shared_from_this();
830 shared_ptr<T const> shared_from_this() const;
834 bool atomic_is_lock_free(const shared_ptr<T>* p);
836 shared_ptr<T> atomic_load(const shared_ptr<T>* p);
838 shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
840 void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
842 void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
844 shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
846 shared_ptr<T>
847 atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
850 atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
853 atomic_compare_exchange_strong( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
856 atomic_compare_exchange_weak_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
857 shared_ptr<T> w, memory_order success,
861 atomic_compare_exchange_strong_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
862 shared_ptr<T> w, memory_order success,
867 template <class T> struct hash<shared_ptr<T> >;
939 #include <__memory/shared_ptr.h>