complete initialization of the static allocated array

bearophile bearophileHUGS at lycos.com
Sun Aug 12 04:52:46 PDT 2012


Alexandr Druzhinin:

> but I don't think it is elegant

If you think that's not elegant, then try to do the opposite: 
instead of giving the full mymap in the static this, try to 
create it from the elements of the enum itself.

In D the enum name is better starting with an upper case, and the 
end semicolon is not needed:

enum Foo { one, three, seven }

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list