This is part of my weekly C++ posts based on the daily C++ tips I make at my work. I strongly recommend this practice. If you don't have it in your company start it.
List of all weekly posts can be found here.
std::accumulate is a fundamental STL algorithm that uses operator+ on the elements of a range or applies a custom provided operator: