The g++ -Wall option includes -Wreorder. What this option does is described below. It is not obvious to me why somebody would care (especially enough to turn this on by de
Consider:
struct A { int i; int j; A() : j(0), i(j) { } };
Now i is initialized to some unknown value, not zero.
i
Alternatively, the initialization of i may have some side effects for which the order is important. E.g.
A(int n) : j(n++), i(n++) { }