Seems like this would be a duplicate, but maybe it is just so obvious it hasn\'t been asked...
Is this the proper way of checking if a variable (not pointer) is init
There is no way of checking of the contents of a variable are undefined or not. The best thing you can do is to assign a signal/sentinel value (for example in the constructor) to indicate that further initialization will need to be carried out.