hashed array?
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Mon Nov 12 08:08:28 PST 2012
On 11/12/2012 04:49 PM, monarch_dodra wrote:
> Wait. That doesn't work actually. This does.
> auto add(T value)
> {
> return _data[value] = cast(void[0]) null;
> }
Only with DMD. GDC and LDC both reject this formulation -- it seems better to
use byte instead of void[0].
The problem is this workaround version blows up massively with number of entries
-- disproportionately to how much memory it would take to simply store all the
key values. :-(
More information about the Digitalmars-d
mailing list