问问题
407 次
2 回答
1
I would advise you to use Boost.Phoenix with is a better implementation of lambda facilities in C++ and already has lazy version of std containers methods.
http://www.boost.org/doc/libs/1_46_1/libs/spirit/phoenix/doc/html/index.html
Phoenix is currently hidden inside Spirit but it is planned to become a first class boost citizen in 1.47 which is due soon.
于 2011-05-07T17:33:38.103 回答
1
Did you try something like this?
for_each(a.begin(), a.end(), bind(&std::vector<int>::push_back, &b, _1));
于 2011-05-07T17:34:38.077 回答