version specific enum members

Phil Deets pjdeets2 at
Thu Oct 29 16:05:36 PDT 2009

Hi, is there a way to add members to an enum based on conditional  
compilation symbols. I tried

enum Tag {
    A, B,
    version (symbol) {
       C, D,

but it doesn't work. I know I could do

version (symbol) {
    enum Tag { A, B, C, D, E }
} else {
    enum Tag { A, B, E }

but I don't want to do that since in my case, there can be quite a few  
elements outside of the version, and I don't want to repeat them all.

Using Opera's revolutionary e-mail client:

More information about the Digitalmars-d-learn mailing list