Iterate on several vectors one after another?

90 Views Asked by At

I have a vector of vectors: std::vector<std::vector<float>>. I would like to know, is there any utility in range-v3 or std::ranges to iterate consecutively on the internal vectors?

I know there is ranges::views::concat, but apparently I have to list the ranges I want to concatenate.

Is there any way to do this?

std::vector<std::vector<float>> vs;
auto v = ranges::views::concat(vs);

https://godbolt.org/z/zKxzTevqc

0

There are 0 best solutions below