version and configuration

Spacen Jasset via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 12 07:41:40 PDT 2015


If I say this in one module:

version = current

version (Current) {
    version = featurea;
    version = featureb;
    version = featurec;
}

It appears that I can't put this in a module and import it 
elsewhere to test the version specifications as they are all in 
their own namespaces. Is this then a dead end for having a 
feature configuration file?

Is the way to do this to define some constants in a module, and 
test these instead. Something like:

features.d

featureA = true;
featureB = false;
--------------------------

main.d

import features;

static if (featureA == true) {

}


More information about the Digitalmars-d-learn mailing list