const QPointF points[] = { QPointF(r.left() - i, r.top() - i), QPointF(r.right() + i, r.top() - i), QPointF(r.right() + i, r.bottom() + i), QPointF(r.left() - i, r.bottom() + i), points[0] // is this line valid (according to the C++ standard)? }; While this compiles with the MS Visual Studio Compiler, i am not sure if this is valid code according to the C++ Standard.
Quotes from the Standard would be highly appreciated.
g++ -pedanticdoesn't complain.const int x = x;either.points[0]does not refer to a valid object "by that time".points[0]has an indeterminate value.