Sets

Michiel nomail at hotmail.com
Mon Feb 5 09:44:10 PST 2007


Is there a built-in way to create a set in D? Like an associative array, only
without the value?

I tried: void[KeyType] setName;

It compiled. But there doesn't seem to be a way to add an item to the set.

Am I missing something? Or is it just a bug that this even compiled?

I know I could just use a dummy value, but that's just not very elegant.

Thanks!



More information about the Digitalmars-d mailing list