1

MSVC reports

warning C4709: comma operator within array index expression

on the following line:

intersections[img::at(rotJ, rotI)];

Without knowing more, is there any chance that this warning is valid?

Museful
  • 6,711
  • 5
  • 42
  • 68

1 Answers1

2

The warning C4709: comma operator within array index expression is a rather buggy warning and has numerous reports all over the internet. See for e.g this or this or this (9 years old).

So the answer is, it is misleading.

Note that if someone were to use the comma-operator within the array index:

int a[3] = {1, 2, 3};
cout << a[1, 2]; // outputs 3
Waqar
  • 8,558
  • 4
  • 35
  • 43