GSP
Quick Navigator

Search Site

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

Support
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::experimental::unique_resource::reset(3) C++ Standard Libary std::experimental::unique_resource::reset(3)

std::experimental::unique_resource::reset - std::experimental::unique_resource::reset


void reset() noexcept; (1) (library fundamentals TS v3)
template <class RR> (2) (library fundamentals TS v3)
void reset( RR&& r );


1) Disposes the resource by calling the deleter with the underlying resource handle
if the unique_resource owns it. The unique_resource does not own the resource after
the call.
2) Replaces the resource by calling (1) and then assigns the stored resource handle
with std::forward<RR>(r) if std::is_nothrow_assignable_v<RS, RR> is true, otherwise
std::as_const(r), where RS is the type of stored resource handle. The
unique_resource owns the resource after the call.
If copy-assignment of the store resource handle throws an exception, calls del_(r),
where del is the deleter object.
This overload participates in overload resolution only if the selected assignment
expression assigning the stored resource handle is well-formed.
The program is ill-formed if del_(r) is ill-formed.
The behavior is undefined if del_(r) results in undefined behavior or throws an
exception.


r - resource handle for a new resource to manage


(none)


2) Any exception thrown in assigning the stored resource handle.


The mechanism ensures no leaking of resources.


This section is incomplete
Reason: no example


reset replaces the managed object
(public member function of std::unique_ptr<T,Deleter>)

2022.07.31 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.