A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.tutorialspoint.com/cpp_standard_library/cpp_functional_operator.htm below:

C++ Functional Operators

C++ Functional Library - Operator Description

It is used to assign the new target.

Declaration

Following is the declaration for function::operator=

C++11

The following function is assigning a copy of target of other, as if by executing function(other).

function& operator=( const function& other );
Exceptions

none

Function Moving

The following function is moving the target of other to *this. other is in a valid state with an unspecified value.

function& operator=( function&& other );
Exceptions

none

Drops the current target

The following function is droping the current target. *this is empty after the call.

function& operator=( std::nullptr_t );
Exceptions

noexcept:noexcept specification.

Sets the target

The following functions are seting the target of *this to the callable f.

template< class F >
function& operator=( F&& f );

template< class F > 
function& operator=( std::reference_wrapper f )
Exceptions

noexcept:noexcept specification.

Parameters

functional.htm


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4