by unsignedqword · 10y ago · 0 comments
import std.array : uninitializedArray;
int a; /+ defaults to '0' +/
int b = void; /+ not initialized +/
bool[5] c; /+ defaults to array of 'false' +/
auto d = uninitializedArray!(bool[])(5); /+ not initialized +/Using 'auto' in C++ forces out uninitialized variables as well.