I have a c++ class with const& members which are initialized in the initialization list of the constructor.
The order of the initialization of the members is crucial, for which I rely on the order of member declarations in the class declaration and the corresponding order in the initialization list.
Compiles fine without errors or warnings.
My question is: can I by some means, like static_assert or similar, assure, that nobody ever changes the order of either the declarations or the initialization list?
I know, that doing so would trigger a compiler warning, but there are people out there who just don't care about compiler warnings. So, is there a way to turn this into an error message... ?