How can I solve the following situation, for any container-type which can use the for_each function -> for a vector this would be easy, because I could add a variable outside the call and give it as a reference parameter and increment it in the lambda function. So how can I get the current iterator in the lambda function?
std::for_each(container.begin(), container.end(), []() {
//do-something and get the current iterator
});