Need a collection of unique elements (like C++ std::set).

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Jan 2 04:18:13 PST 2014


On 1/2/14, Cooler <kulkin at hotbox.ru> wrote:
> Interesting... What is a profit of this solution over simple
> bool[int]?

AFAIK it will make the druntime hashes avoid allocating memory for the
value type, because:

assert(bool.sizeof == 1);
assert((void[0]).sizeof == 0);

Note that void[0] is different from void[], as the latter is really
two size_t types in a struct.


More information about the Digitalmars-d mailing list