Nothing type/value aka Unit
dayllenger
dayllenger at protonmail.com
Sat Feb 9 18:13:26 UTC 2019
On Friday, 8 February 2019 at 14:57:11 UTC, Jonathan Levi wrote:
> I think I will use:
>
> alias Unit = typeof(null);
> enum Unit unit = null;
void[0] is better, because it almost always has exactly 0 bytes
size, but typeof(null) is 4-8 bytes depending of arch. Also there
is a nasty segfault when trying to resize typeof(null) array, I
don't know why, something related to unaligned data.
More information about the Digitalmars-d
mailing list