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

std::experimental::unique_resource::operator= - std::experimental::unique_resource::operator=


unique_resource& operator=( unique_resource&& other ) (library fundamentals TS v3)
noexcept(/*see below*/);


Move assignment operator. Replaces the managed resouce and the deleter with other's.


Formally, let RS be the type of stored resource handle:


* First, calls reset() to dispose the currently owned resource, if any.
* Then assigns the stored resource handle and the deleter with other's. std::move
is applied to the stored resource handle or the deleter of other if
std::is_nothrow_move_assignable_v<RS> or std::is_nothrow_move_assignable_v<D> is
true respectively. Assignment of the stored resource handle is executed first,
unless std::is_nothrow_move_assignable_v<D> is false and
std::is_nothrow_move_assignable_v<RS> is true.
* Finally, sets *this to own the resource if and only if other owned it before
assignment, and other not to own the resource.


If std::is_nothrow_move_assignable_v<RS> is true, RS shall satisfy the
MoveAssignable requirements; otherwise RS shall satisfy the CopyAssignable
requirements. If std::is_nothrow_move_assignable_v<D> is true, D shall satisfy the
MoveAssignable requirements; otherwise D shall satisfy the CopyAssignable
requirements. Failing to satisfy above requirements results in undefined behavior.


other - resource wrapper from which ownership will be transferred


*this


Any exception thrown in copy-assignment.


noexcept specification:
noexcept(std::is_nothrow_move_assignable_v<RS> &&
std::is_nothrow_move_assignable_v<D>)


If a copy of a member throws an exception, this mechanism leaves other intact and
*this in the released state.


This section is incomplete
Reason: no example


reset disposes or replaces the managed resource
(public member function)
operator= assigns the unique_ptr
(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.