STL中为什么没有ptr_fun_ref?
#include <algorithm>
#include <functional>
#include <iostream>
bool not_equal_to(int l,int r){return l!=r;}
bool not_equal_to_ref(const int& l,const int& r){return l!=r;}
int main()
{
using namespace std;
const int r[]={1,2,3,0};
//The following code fragment finds the first integer
//in a range that is equal to zero.
std::cout << *find_if(r, r+sizeof(r)/sizeof(*r),not1(bind2nd(ptr_fun(::not_equal_to),0)));
}
//output:0
//这个示例程序是正确的。但是如果我想用not_equal_to_ref来代替not_equal_to,
//应该怎样做呢?