On 9/21/13, bearophile <bearophileh...@lycos.com> wrote: > I think there is no simple > way to know if a variable has being default-initialized or not. > Why do you want to know it?
There is however a way to extract it if it's a part of an aggregate: ----- struct S { int x = 1; } void main() { static assert(S.x.init == 0); static assert(S.init.x == 1); } -----