std::experi...tr::weak_ptr(3)
πΈ NAME πΈ
okay bestie, welcome to std::experi...tr::weak_ptr(3) from the C++ Standard Libary manual β yes, βLibaryβ is literally what the header says, and we respect the typo π
.
The NAME section is giving repetition main character energy: std::experimental::weak_ptr::weak_ptr β and then again, std::experimental::weak_ptr::weak_ptr. Itβs the std::experimental::weak_ptr::weak_ptr constructor, periodt.
π Synopsis π
Constructs a new weak_ptr that potentially shares an object with r.
- (1) (library fundamentals TS)
constexpr weak_ptr() noexcept;
- (2) (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( const std::experimental::shared_ptr<Y>& r ) noexcept;
- (3) (library fundamentals TS)
weak_ptr( weak_ptr&& r ) noexcept;
- (3) (library fundamentals TS)
template< class Y >
weak_ptr( weak_ptr<Y>&& r ) noexcept;
- Default constructor. Constructs empty
weak_ptr. Lowkey the simplest slay. - Constructs new
weak_ptrwhich shares an object managed byr. Ifrmanages no object,*thismanages no object too. The templated overloads don't participate in overload resolution unless eitherY*is implicitly convertible toT*, orYis the type "array of N U" for some typeUand some numberN, andTis the type "array of unknown bound of (possibly cv-qualified) U". Yes bestie, thatβs the whole vibe check π«Ά. - Move constructors. Moves a
weak_ptrinstance fromrinto*this. After this,ris empty andr.use_count() == 0. The templated overload doesn't participate in overload resolution unless eitherY*is implicitly convertible toT*, orYis the type "array of N U" for some typeUand some numberN, andTis the type "array of unknown bound of (possibly cv-qualified) U". Same energy, singular overload edition β¨.
π«Ά Parameters π«Ά
rβ astd::experimental::shared_ptrorstd::experimental::weak_ptrthat will be viewed by thisstd::experimental::weak_ptr.
π Exceptions π
noexcept specification: noexcept
π Example π
This section is incomplete Reason: no example
π See also π
- constructor β creates a new
weak_ptr(public member function ofstd::weak_ptr<T>) - operator= β assigns the
weak_ptr(public member function ofstd::weak_ptr<T>)
π§ Categories π§
Noindexed pagesunconditionally noexceptTodo no example
thatβs the whole page, bestie π source: http://cppreference.com, version/date: 2024.06.10, page: std::experi...tr::weak_ptr(3) β bye byeee π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms