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

std::experimental::any::operator= - std::experimental::any::operator=


any& operator=( const any& rhs ); (1) (library fundamentals TS)
any& operator=( any&& rhs ) noexcept; (2) (library fundamentals TS)
template<typename ValueType> (3) (library fundamentals TS)
any& operator=( ValueType&& rhs );


Assigns contents to the contained value.


1) Assigns by copying the state of rhs, as if by any(rhs).swap(*this).
2) Assigns by moving the state of rhs, as if by any(std::move(rhs)).swap(*this). rhs
is left in a valid but unspecified state after the assignment.
3) Assigns the type and value of rhs, as if by
any(std::forward<ValueType>(rhs)).swap(*this). If
std::is_copy_constructible<std::decay_t<ValueType>>::value is false, the program is
ill-formed. This overload participates in overload resolution only if
std::decay_t<ValueType> is not the same type as any.


ValueType - contained value type


-
std::decay_t<ValueType> must meet the requirements of CopyConstructible.


rhs - object whose contained value to assign


*this


1,3) Throws bad_alloc or any exception thrown by the constructor of the contained
type. If an exception is thrown, there are no effects (strong exception guarantee).


constructor constructs an any object
(public member function)

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.