std::out_ptr_t::out_ptr_t(3)
β¨ NAME β¨
std::out_ptr_t::out_ptr_t - std::out_ptr_t::out_ptr_t
okay bestie, this is the std::out_ptr_t::out_ptr_t(3) page from the C++ Standard Libary manual β yes, that spelling is what the header says, iykyk ππ
π¦ Synopsis π¦
explicit out_ptr_t( Smart &sp, Args... args ); (1) (since C++23)
out_ptr_t( const out_ptr_t& ) = delete; (2) (since C++23)
- Creates an
out_ptr_t. Adaptsspas if it binds it to theSmart&member, captures every argumenttinargs...as if initializes the corresponding member of typeTinArgs...withstd::forward<T>(t), then value-initializes the storedPointer. Then callssp.reset()if the expression is well-formed; otherwise, callssp = Smart()ifstd::is_default_constructible_v<Smart>is true. The program is ill-formed if both resetting operations are ill-formed. π«Ά - Copy constructor is explicitly deleted.
out_ptr_tis neither copyable nor movable. π«β¨
πΈ Parameters πΈ
spβ the object (typically a smart pointer) to adapt.args...β the arguments used for resetting to capture.
π Return value π
(none) β literally no return value, bestie π
π Exceptions π
May throw implementation-defined exceptions.
π§ Notes π§
- After construction, the
Pointerorvoid*object pointed by the return value of either conversion function is equal tonullptr. β¨ - Every argument in
args...is moved into the createdout_ptr_tif it is of an object type, or transferred into the createdout_ptr_tas-is if it is of a reference type. - The constructor of
out_ptr_tis allowed to throw exceptions. For example, whenspis astd::shared_ptr, the allocation for the new control block may be performed within the constructor rather than the destructor.
π Example π
This section is incomplete.
Reason: no example.
π Category: π
Todo no example
mwah π cute sign-off time: source http://cppreference.com, version/date 2024.06.10, page std::out_ptr_t::out_ptr_t(3) β catch u later, bestie π«Ά
π¦ 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