hashed array?

monarch_dodra monarchdodra at gmail.com
Mon Nov 12 07:49:11 PST 2012


On Monday, 12 November 2012 at 15:36:29 UTC, monarch_dodra wrote:
> As for the implementation, this seems to work:
>
>
> StringSet(T)
> {
>     private void[0][T] _data;
>     void add(T value)
>     {
>         _data.get(value, cast(void[0]) null);
>     }
> }

Wait. That doesn't work actually. This does.
     auto add(T value)
     {
         return _data[value] = cast(void[0]) null;
     }


More information about the Digitalmars-d mailing list