What's the best way to find distinct pairs in an array? In other words - how to rewrite the code below using std::ranges
for (int i = 0; i < N; ++i)
for (int j = i+1; j < N; ++j)
generate_pair(X[i], X[j]);
What's the best way to find distinct pairs in an array? In other words - how to rewrite the code below using std::ranges
for (int i = 0; i < N; ++i)
for (int j = i+1; j < N; ++j)
generate_pair(X[i], X[j]);