How about a Hash template?

bearophile bearophileHUGS at lycos.com
Wed Apr 27 17:25:05 PDT 2011


Andrej Mitrovic:

> http://codepad.org/a3aCokKT

Suggestion for the run-time version:

assert(color in hash(red, green, blue));
==>
assert(color in set([red, green, blue]));

Bye,
bearophile


More information about the Digitalmars-d mailing list