Avoid initializing a struct field.

jerro a at a.com
Sat May 4 11:11:02 PDT 2013


Is there a way to avoid default initializing a struct field in D? 
The following doesn't seem to work:

struct Foo
{
     int[42] buffer = void;
     int bar;
}

I know I can do this:

Foo foo = void

But then all fields are uninitialized.


More information about the Digitalmars-d-learn mailing list