The following class and constructor receive the warning about initializing members should be in the proper order:
class test {
public:
test(const uint16_t x, const uint16_t y) :
x { x }, y { x } {
}
uint16_t z { };
uint16_t x;
uint16_t y;
};
The actual order is okay but the detector doesn't like 'z' being initialized at its declaration. Only with 'z' in the constructor initialization list is the detector satisfied.
The following class and constructor receive the warning about initializing members should be in the proper order:
The actual order is okay but the detector doesn't like 'z' being initialized at its declaration. Only with 'z' in the constructor initialization list is the detector satisfied.