Daily bit(e) of C++ | std::views::cartesian_product
Daily bit(e) of C++ ♻️81, The C++23 view of the cartesian product of provided ranges: std::views::cartesian_product.
The C++23 std::views::cartesian_product is a view representing the n-ary cartesian product of the content of the views passed in as arguments.
Using std::views::cartesian_product, we can avoid using nested loops and indices.