Lines Matching refs:shared_ptr

405 class shared_ptr
412 constexpr shared_ptr() noexcept;
413 template<class Y> explicit shared_ptr(Y* p);
414 template<class Y, class D> shared_ptr(Y* p, D d);
415 template<class Y, class D, class A> shared_ptr(Y* p, D d, A a);
416 template <class D> shared_ptr(nullptr_t p, D d);
417 template <class D, class A> shared_ptr(nullptr_t p, D d, A a);
418 template<class Y> shared_ptr(const shared_ptr<Y>& r, T *p) noexcept;
419 shared_ptr(const shared_ptr& r) noexcept;
420 template<class Y> shared_ptr(const shared_ptr<Y>& r) noexcept;
421 shared_ptr(shared_ptr&& r) noexcept;
422 template<class Y> shared_ptr(shared_ptr<Y>&& r) noexcept;
423 template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
424 template<class Y> shared_ptr(auto_ptr<Y>&& r); // removed in C++17
425 template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);
426 shared_ptr(nullptr_t) : shared_ptr() { }
429 ~shared_ptr();
432 shared_ptr& operator=(const shared_ptr& r) noexcept;
433 template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
434 shared_ptr& operator=(shared_ptr&& r) noexcept;
435 template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);
436 template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r); // removed in C++17
437 template <class Y, class D> shared_ptr& operator=(unique_ptr<Y, D>&& r);
440 void swap(shared_ptr& r) noexcept;
453 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
458 shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
460 shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;
462 // shared_ptr comparisons:
464 bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
466 bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
468 bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
470 bool operator>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
472 bool operator<=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
474 bool operator>=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
477 bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
479 bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept;
481 bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept;
483 bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept;
485 bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept;
487 bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept;
489 bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept;
491 bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept;
493 bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept;
495 bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept;
497 bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept;
499 bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept;
501 // shared_ptr specialized algorithms:
502 template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
504 // shared_ptr casts:
506 shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r) noexcept;
508 shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r) noexcept;
510 shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r) noexcept;
512 // shared_ptr I/O:
514 basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);
516 // shared_ptr get_deleter:
517 template<class D, class T> D* get_deleter(shared_ptr<T> const& p) noexcept;
520 shared_ptr<T> make_shared(Args&&... args);
522 shared_ptr<T> allocate_shared(const A& a, Args&&... args);
532 template<class Y> weak_ptr(shared_ptr<Y> const& r) noexcept;
544 template<class Y> weak_ptr& operator=(shared_ptr<Y> const& r) noexcept;
555 shared_ptr<T> lock() const noexcept;
556 template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
561 weak_ptr(shared_ptr<T>) -> weak_ptr<T>;
570 struct owner_less<shared_ptr<T> >
571 : binary_function<shared_ptr<T>, shared_ptr<T>, bool>
574 bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const noexcept;
575 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
576 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
585 bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
586 bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
593 bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
595 bool operator()( shared_ptr<_Tp> const& __x, weak_ptr<_Up> const& __y) const noexcept;
597 bool operator()( weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
613 shared_ptr<T> shared_from_this();
614 shared_ptr<T const> shared_from_this() const;
618 bool atomic_is_lock_free(const shared_ptr<T>* p);
620 shared_ptr<T> atomic_load(const shared_ptr<T>* p);
622 shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
624 void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
626 void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
628 shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
630 shared_ptr<T>
631 atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
634 atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
637 atomic_compare_exchange_strong( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
640 atomic_compare_exchange_weak_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
641 shared_ptr<T> w, memory_order success,
645 atomic_compare_exchange_strong_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
646 shared_ptr<T> w, memory_order success,
651 template <class T> struct hash<shared_ptr<T> >;
682 #include <__memory/shared_ptr.h>