cpp_weekly icon indicating copy to clipboard operation
cpp_weekly copied to clipboard

practical differences between std::accumulate, std::reduce, std::ranges::fold_left, std::ranges::fold_right

Open reedhedges opened this issue 2 years ago • 1 comments

Channel

C++Weekly

Topics

What are the practical differences between std::accumulate, std::reduce, std::ranges::fold_left, std::ranges::fold_right and any other similar algorithms or ways to compute a result from a range, sequence,.or container.

Length

Probably doesn't need to be very long, just an example of each with commentary

reedhedges avatar Feb 22 '23 16:02 reedhedges

C++23’s New Fold Algorithms https://devblogs.microsoft.com/cppblog/cpp23s-new-fold-algorithms/

reedhedges avatar Apr 14 '23 14:04 reedhedges