stl binder1st

[复制链接]
查看11 | 回复0 | 2010-6-24 15:49:53 | 显示全部楼层 |阅读模式
#include
#include
#include
#include
using namespace std;
template
struct binary_function
{
typedef type1 first_argument_type;
typedef type2 second_argument_type;
typedef result result_type;
};
template
struct plus:public binary_function
{
T operator () (const T& a, const T& b)
{
return a + b;
}
};
void show(int a)
{
cout binder1st定义在functional头文件中,如果你要用自己的plus,可以改个名字或放在一个自己的namespace中
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行