I was just wondering if there was anything (either in c++11 or boost) that could help me do something like this:
std::vector v1 = {1, 2, 3}; std::
You can use the 5 parameter overload of std::transform for this. This takes a binary functor to operate on pairs of elements of two ranges:
std::transform(v1.begin(), v1.end(), v2.begin(), back_inserter(res), std::plus());