2

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]);
康桓瑋
  • 33,481
  • 5
  • 40
  • 90
innochenti
  • 1,093
  • 2
  • 8
  • 23

0 Answers0