Lines Matching refs:shared_ptr
402 class shared_ptr
409 constexpr shared_ptr() noexcept;
410 template<class Y> explicit shared_ptr(Y* p);
411 template<class Y, class D> shared_ptr(Y* p, D d);
412 template<class Y, class D, class A> shared_ptr(Y* p, D d, A a);
413 template <class D> shared_ptr(nullptr_t p, D d);
414 template <class D, class A> shared_ptr(nullptr_t p, D d, A a);
415 template<class Y> shared_ptr(const shared_ptr<Y>& r, T *p) noexcept;
416 shared_ptr(const shared_ptr& r) noexcept;
417 template<class Y> shared_ptr(const shared_ptr<Y>& r) noexcept;
418 shared_ptr(shared_ptr&& r) noexcept;
419 template<class Y> shared_ptr(shared_ptr<Y>&& r) noexcept;
420 template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
421 template<class Y> shared_ptr(auto_ptr<Y>&& r); // removed in C++17
422 template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);
423 shared_ptr(nullptr_t) : shared_ptr() { }
426 ~shared_ptr();
429 shared_ptr& operator=(const shared_ptr& r) noexcept;
430 template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
431 shared_ptr& operator=(shared_ptr&& r) noexcept;
432 template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);
433 template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r); // removed in C++17
434 template <class Y, class D> shared_ptr& operator=(unique_ptr<Y, D>&& r);
437 void swap(shared_ptr& r) noexcept;
450 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
455 shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
457 shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;
459 // shared_ptr comparisons:
461 bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
463 bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
465 bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
467 bool operator>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
469 bool operator<=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
471 bool operator>=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
474 bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
476 bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept;
478 bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept;
480 bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept;
482 bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept;
484 bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept;
486 bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept;
488 bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept;
490 bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept;
492 bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept;
494 bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept;
496 bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept;
498 // shared_ptr specialized algorithms:
499 template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
501 // shared_ptr casts:
503 shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r) noexcept;
505 shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r) noexcept;
507 shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r) noexcept;
509 // shared_ptr I/O:
511 basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);
513 // shared_ptr get_deleter:
514 template<class D, class T> D* get_deleter(shared_ptr<T> const& p) noexcept;
517 shared_ptr<T> make_shared(Args&&... args);
519 shared_ptr<T> allocate_shared(const A& a, Args&&... args);
529 template<class Y> weak_ptr(shared_ptr<Y> const& r) noexcept;
541 template<class Y> weak_ptr& operator=(shared_ptr<Y> const& r) noexcept;
552 shared_ptr<T> lock() const noexcept;
553 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
558 weak_ptr(shared_ptr<T>) -> weak_ptr<T>;
567 struct owner_less<shared_ptr<T> >
568 : binary_function<shared_ptr<T>, shared_ptr<T>, bool>
571 bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const noexcept;
572 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
573 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
582 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
583 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
590 bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
592 bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept;
594 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
610 shared_ptr<T> shared_from_this();
611 shared_ptr<T const> shared_from_this() const;
615 bool atomic_is_lock_free(const shared_ptr<T>* p);
617 shared_ptr<T> atomic_load(const shared_ptr<T>* p);
619 shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
621 void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
623 void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
625 shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
627 shared_ptr<T>
628 atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
631 atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
634 atomic_compare_exchange_strong( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
637 atomic_compare_exchange_weak_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
638 shared_ptr<T> w, memory_order success,
642 atomic_compare_exchange_strong_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
643 shared_ptr<T> w, memory_order success,
648 template <class T> struct hash<shared_ptr<T> >;
690 #include <__memory/shared_ptr.h>