Question: I'm wondering: is there any possibility to add additional condition to for each?
I'm thinking about something like:

```
int i=0;
for(auto &it : list; i++)
    if(it.ID == 25)
        return i;

```

or 

```
for(auto &it : list, int i=0; i++)
    if(it.ID == 25)
        return i;

```

Answer: 
You can use `std::find_if`:

```
const auto position = std::find_if(list.cbegin(), list.cend(), []((decltype(*list.cbegin()) value)
{
    return value.ID == 25;
});
return position - list.cbegin();

```

(Updated, now independent of container value\_type)
No it's not possible. You can use the old "normal" `for` loop for that:

```
auto iter = std:begin(list)
for (int i = 0; iter != std::end(list); ++iter, ++i)
{
    auto& it = *iter;

    // ...
}

```