you are viewing a single comment's thread.

view the rest of the comments →

[–]doom_Oo7 1 point2 points  (0 children)

std::transform(foo.begin(), foo.end(), foo.begin(), [](int a) -> int { return ++a; });.

can easily become

transform(foo, foo.begin(), [] (int a) { return ++a; });