I'm wondering what value a bit-field class member variable will have if it is not explicitly initialized.
Using an example from unreal engine 4.27:
//member variable of UPrimitiveComponent
//there are other uint8 bitfields declared above and below this
UPROPERTY(...some UE4 macro stuff...)
uint8 bCastHiddenShadow:1;
It is not explicitly initialized in the header, the constructor member initializer list or the constructor body. Yet it seems to get initialized to 0 fine. For a non-bitfield variable I think this would be undefined behaviour, but I assume this isn't the case here? Or does the value depend on the initialization of nearby packed bit-field variables (some of which are explicitly initialized)?
(Or, not sure if the UPROPERTY macro is somehow doing some magic to initialize it? Apologies, couldn't find a full definition of the macro anywhere)