A better solution is to use:

struct Path {
    enum : string {
        log1 = "/var/log1",
        log2 = "/var/log2"
    }
}


Or even just:

struct Path {
    enum string log1 = "/var/log1",
                log2 = "/var/log2";
}

(In D structs, classes and enums start with an upper case).

Bye,
bearophile

Reply via email to