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;
2.1m questions
2.1m answers
60 comments
57.0k users