Lines Matching refs:shared_ptr

583 class shared_ptr
591 constexpr shared_ptr() noexcept;
592 template<class Y> explicit shared_ptr(Y* p);
593 template<class Y, class D> shared_ptr(Y* p, D d);
594 template<class Y, class D, class A> shared_ptr(Y* p, D d, A a);
595 template <class D> shared_ptr(nullptr_t p, D d);
596 template <class D, class A> shared_ptr(nullptr_t p, D d, A a);
597 template<class Y> shared_ptr(const shared_ptr<Y>& r, T *p) noexcept;
598 shared_ptr(const shared_ptr& r) noexcept;
599 template<class Y> shared_ptr(const shared_ptr<Y>& r) noexcept;
600 shared_ptr(shared_ptr&& r) noexcept;
601 template<class Y> shared_ptr(shared_ptr<Y>&& r) noexcept;
602 template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
603 template<class Y> shared_ptr(auto_ptr<Y>&& r); // removed in C++17
604 template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);
605 shared_ptr(nullptr_t) : shared_ptr() { }
608 ~shared_ptr();
611 shared_ptr& operator=(const shared_ptr& r) noexcept;
612 template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
613 shared_ptr& operator=(shared_ptr&& r) noexcept;
614 template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);
615 template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r); // removed in C++17
616 template <class Y, class D> shared_ptr& operator=(unique_ptr<Y, D>&& r);
619 void swap(shared_ptr& r) noexcept;
632 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
637 shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
639 shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;
641 // shared_ptr comparisons:
643 bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
645 …bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed…
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 strong_ordering operator<=>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // C++20
658 bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
660 bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
662 bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
664 bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
666 bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
668 bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
670 bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
672 bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
674 bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
676 bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
678 bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
680 bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
682 strong_ordering operator<=>(shared_ptr<T> const& x, nullptr_t) noexcept; // C++20
684 // shared_ptr specialized algorithms:
685 template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
687 // shared_ptr casts:
689 shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r) noexcept;
691 shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r) noexcept;
693 shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r) noexcept;
695 // shared_ptr I/O:
697 basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);
699 // shared_ptr get_deleter:
700 template<class D, class T> D* get_deleter(shared_ptr<T> const& p) noexcept;
703 shared_ptr<T> make_shared(Args&&... args); // T is not an array
705 shared_ptr<T> allocate_shared(const A& a, Args&&... args); // T is not an array
708 shared_ptr<T> make_shared(size_t N); // T is U[] (since C++20)
710 shared_ptr<T> allocate_shared(const A& a, size_t N); // T is U[] (since C++20)
713 shared_ptr<T> make_shared(); // T is U[N] (since C++20)
715 shared_ptr<T> allocate_shared(const A& a); // T is U[N] (since C++20)
718 shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // T is U[] (since C++20)
720shared_ptr<T> allocate_shared(const A& a, size_t N, const remove_extent_t<T>& u); // T is U[] (sin…
722 template<class T> shared_ptr<T>
725shared_ptr<T> allocate_shared(const A& a, const remove_extent_t<T>& u); // T is U[N] (since C++20)
728 shared_ptr<T> make_shared_for_overwrite(); // T is not U[], C++20
730 shared_ptr<T> allocate_shared_for_overwrite(const A& a); // T is not U[], C++20
733 shared_ptr<T> make_shared_for_overwrite(size_t N); // T is U[], C++20
735 shared_ptr<T> allocate_shared_for_overwrite(const A& a, size_t N); // T is U[], C++20
746 template<class Y> weak_ptr(shared_ptr<Y> const& r) noexcept;
758 template<class Y> weak_ptr& operator=(shared_ptr<Y> const& r) noexcept;
769 shared_ptr<T> lock() const noexcept;
770 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
775 weak_ptr(shared_ptr<T>) -> weak_ptr<T>;
784 struct owner_less<shared_ptr<T> >
785 : binary_function<shared_ptr<T>, shared_ptr<T>, bool>
788 bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const noexcept;
789 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
790 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
799 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
800 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
807 bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
809 bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept;
811 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
827 shared_ptr<T> shared_from_this();
828 shared_ptr<T const> shared_from_this() const;
832 bool atomic_is_lock_free(const shared_ptr<T>* p);
834 shared_ptr<T> atomic_load(const shared_ptr<T>* p);
836 shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
838 void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
840 void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
842 shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
844 shared_ptr<T>
845 atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
848 atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
851 atomic_compare_exchange_strong( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
854 atomic_compare_exchange_weak_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
855 shared_ptr<T> w, memory_order success,
859 atomic_compare_exchange_strong_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
860 shared_ptr<T> w, memory_order success,
865 template <class T> struct hash<shared_ptr<T> >;
898 #include <__memory/shared_ptr.h>