Is there a way to raise an error if each constructor does not initialize this member? Maybe something with const?
I want this because I have a bunch of code where I get errors as a result of incorrect calculation of element values. What I really would like to do is get rid of all the mess and follow the compiler’s example when it is executed again (write code that uses the final result, fix errors due to the use of non-existent code, fix errors, etc.). The only step this does not work on is the member variables, because I am not forced to initialize them in the constructors, for example, for local variables.
source
share