If you want to find out more about the std::ranges::fold_* algorithms in C++23, here's a new post for you.
C++23’s New Fold Algorithms
By Sy Brand
From the article:
C++20 added new versions of the standard library algorithms which take ranges as their first argument rather than iterator pairs, alongside other improvements. However, key algorithms like std::accumulate were not updated. This has been done in C++23, with the new std::ranges::fold_* family of algorithms.
Add a Comment