I am using range-v3 and sometimes I used ranges::views::enumerate to have the id of the value that I'm iterating on. enumerate view returns a tuple containing the id and the value, so I would like to know if its possible to unpack directly that tuple. This would be an example:
ranges::views::enumerate
enumerate
samplers | ranges::views::enumerate | ranges::views::transform([](const auto samplerId, const auto &jSampler){...} | ranges::to_vector;
1.4m articles
1.4m replys
5 comments
57.0k users