GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
* Sign Up! *

Support
Customer Portal
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::out_ptr_t::~out_ptr_t(3) C++ Standard Libary std::out_ptr_t::~out_ptr_t(3)

std::out_ptr_t::~out_ptr_t - std::out_ptr_t::~out_ptr_t


~out_ptr_t(); (since C++23)


Resets the adapted Smart object by the value of modified Pointer object (or the
void* object if operator void**() has been called) and the captured arguments.


Let


* s denotes the adapted Smart object,
* args... denotes the captured arguments,
* p denotes the value of stored Pointer, or static_cast<Pointer>(*operator
void**()) if operator void** has been called,
* SP be
* Smart::pointer, if it is valid and denotes a type, otherwise,
* Smart::element_type*, if Smart::element_type is valid and denotes a type,
otherwise,
* std::pointer_traits<Smart>::element_type*, if
std::pointer_traits<Smart>::element_type is valid and denotes a type,
otherwise,
* Pointer.


If s.reset(static_cast<SP>(p), std::forward<Args>(args)...) is well-formed, the
destructor performs


if (p) s.reset(static_cast<SP>(p), std::forward<Args>(args)...);,


otherwise, if std::is_constructible_v<Smart, SP, Args...> is true, the destructor
performs


if (p) s = Smart(static_cast<SP>(p), std::forward<Args>(args)...);,


otherwise, the program is ill-formed.


If Smart is a std::shared_ptr specialization, the implementation may allocate the
storage for the new control block on construction, in order to leave non-throwing
works to the destructor.


Arguments captured by value are destroyed after resetting.

2024.06.10 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.