Name: Anonymous 2011-01-23 14:03
its over; you've lost. C++0x will have lambda functions. 2011 is the year of C++0x and there is not a goddamn thing you can do about it.
std::vector<int> some_list;
int total = 0;
std::for_each(some_list.begin(), some_list.end(), [&total](int x) {
total += x;
});[&total](int x) { total += x; }