sgi compose_f_gx 是什么东东??
1. c++标准库书上,作者提到 “我把这种函数配接器叫做compose_f_gx ",
感觉:compose_f_gx 有很多版本, 它应该是一种 所谓的组合型的函数配接器。。。
作者然后给了个版本。。。。
对这个熟悉的大牛,能提供其他例子吗?? 谢谢了啊。。。
2. 这种东西 是不是没有什么作用啊??? 不知道用在什么地方啊???
[解决办法]
1.这个名称恐怕是作者自己取的。
#include <iostream>#include <functional>#include <algorithm>using namespace std;int main () { int numbers[] = {10,20,30,40,50,10}; int cx; cx = count_if (numbers, numbers+6, bind1st(equal_to<int>(),10) ); cout << "There are " << cx << " elements that are equal to 10.\n"; return 0;}
[解决办法]
http://topic.csdn.net/u/20090329/22/cb942576-0aef-4afd-8ca7-94ad6790543d.html