C ++ 11 draft ยง12.6.2.9 says:
If a given non-static data member has both a sliding or peer-initializer and a mem-initializer, the initialization specified by the mem-initializer and the non-static data element associated with the curly bracket or peer-initializer are ignored.
[Example: given
struct A { int i = /โ some integer expression with side effects โ/ ; A(int arg) : i(arg) { }
the constructor A (int) simply initializes I with the arg value, and side effects in the bond or alignment mode will not be accepted. - end of example]
Since initialization is performed in the declaration order (ยง12.6.2.10) with the addition of this rule, the value of bbb and ccc will be 2.
source share