- The C Standard Library
- The C Standard Library
- The C++ Standard Library
- C++ Library - Home
- C++ Library - <fstream>
- C++ Library - <iomanip>
- C++ Library - <ios>
- C++ Library - <iosfwd>
- C++ Library - <iostream>
- C++ Library - <istream>
- C++ Library - <ostream>
- C++ Library - <sstream>
- C++ Library - <streambuf>
- C++ Library - <atomic>
- C++ Library - <complex>
- C++ Library - <exception>
- C++ Library - <functional>
- C++ Library - <limits>
- C++ Library - <locale>
- C++ Library - <memory>
- C++ Library - <new>
- C++ Library - <numeric>
- C++ Library - <regex>
- C++ Library - <stdexcept>
- C++ Library - <string>
- C++ Library - <thread>
- C++ Library - <tuple>
- C++ Library - <typeinfo>
- C++ Library - <utility>
- C++ Library - <valarray>
- The C++ STL Library
- C++ Library - <array>
- C++ Library - <bitset>
- C++ Library - <deque>
- C++ Library - <forward_list>
- C++ Library - <list>
- C++ Library - <map>
- C++ Library - <queue>
- C++ Library - <set>
- C++ Library - <stack>
- C++ Library - <unordered_map>
- C++ Library - <unordered_set>
- C++ Library - <vector>
- C++ Library - <algorithm>
- C++ Library - <iterator>
- C++ Programming Resources
- C++ Programming Tutorial
- C++ Useful Resources
- C++ Discussion
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_wrapperf )
Exceptions
noexcept:noexcept specification.
Parameters
other − This function object used to initialize *this.
f − a callable used to initialize *this.
functional.htm
Advertisements