| Technical Specification | ||||
| Filesystem library(filesystem TS) | ||||
| Library fundamentals(library fundamentals TS) | ||||
| Library fundamentals 2(library fundamentals TS v2) | ||||
| Library fundamentals 3(library fundamentals TS v3) | ||||
| Extensions for parallelism(parallelism TS) | ||||
| Extensions for parallelism 2(parallelism TS v2) | ||||
| Extensions for concurrency(concurrency TS) | ||||
| Extensions for concurrency 2(concurrency TS v2) | ||||
| Concepts(concepts TS) | ||||
| Ranges(ranges TS) | ||||
| Reflection(reflection TS) | ||||
| Mathematical special functions(special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
weak_ptr::weak_ptr | ||||
Members and non-members identical to those ofstd::weak_ptr |
constexpr weak_ptr()noexcept; | (1) | (library fundamentals TS) |
weak_ptr(const weak_ptr& r)noexcept; | (2) | (library fundamentals TS) |
template<class Y> weak_ptr(const weak_ptr<Y>& r)noexcept; | (2) | (library fundamentals TS) |
template<class Y> weak_ptr(conststd::experimental::shared_ptr<Y>& r)noexcept; | (2) | (library fundamentals TS) |
weak_ptr( weak_ptr&& r)noexcept; | (3) | (library fundamentals TS) |
template<class Y> weak_ptr( weak_ptr<Y>&& r)noexcept; | (3) | (library fundamentals TS) |
Constructs a newweak_ptr that potentially shares an object withr.
weak_ptr.weak_ptr which shares an object managed byr. Ifr manages no object,*this manages no object too. The templated overloads don't participate in overload resolution unless eitherY* is implicitly convertible toT*, orY is the type "array ofNU" for some typeU and some numberN, andT is the type "array of unknown bound of (possibly cv-qualified)U".weak_ptr instance fromr into*this. After this,r is empty andr.use_count()==0. The templated overload doesn't participate in overload resolution unless eitherY* is implicitly convertible toT*, orY is the type "array ofNU" for some typeU and some numberN, andT is the type "array of unknown bound of (possibly cv-qualified)U".Contents |
| r | - | astd::experimental::shared_ptr orstd::experimental::weak_ptr that will be viewed by thisstd::experimental::weak_ptr |
| This section is incomplete Reason: no example |
creates a newweak_ptr(public member function of std::weak_ptr<T>)[edit] | |
assigns theweak_ptr(public member function of std::weak_ptr<T>)[edit] |