定义
template< class T = void >
struct plus;
T operator()( const T& lhs, const T& rhs ) const;
(until C++14)
constexpr T operator()( const T& lhs, const T& rhs ) const;
(since C++14)
示例
#include"Complex.h"
#include<algorithm>
#include<functional>
#include<iostream>
using namespace std;
int main() {
const int a = 1;
const int b = 2;
plus<int> c;
cout << c(a, b) << endl;
}