hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.5K
active users

Šimon Tóth

The std::for_each algorithm invokes the provided invocable on each range element in order, ignoring the result. The invocable can be stateful, and the algorithm returns it in its final state.

While the range-based for-loop has mostly replaced the use cases for std::for_each, it still comes in handy as a trivial parallelization tool through the C++17 parallel version.

Compiler Explorer link: compiler-explorer.com/z/EP7TnK