D alternative for C/C++ -Dfoo=42
Cherry
cherry at dream.land
Tue Feb 25 05:27:30 PST 2014
>
> I don't like it. I would prefer a CTFE-able counter part to
> boost::program_options that generates thouse enums from a
> config file.
That would be good.
I would have taken that approach for my current needs, but I do
not see any way to have a fallback if the config file does not
exist. I mean mixin import would just fail to compile if the
configuration file is not present. I need an option to live with
default values if the configuration file is not there. Something
like "static if(fileExists!"config.d") mixin(import("config.d"))
else ...".
Thoughts?
Regards
- Cherry
More information about the Digitalmars-d-learn
mailing list