jarro2783/cxxopts — pull request #8 by wichtounet (2014-10-27 18:37:09+00:00)
Title: Default and implicit values

This patch add support for default values and implicit values.

They can be used like that:

("o,output", "Output file", cxxopts::value()->default_value("a.out")->implicit_value("b.def"))

You can specify either the default value or the implicit value or both. I took the same model as was done in Boost Program Options.

While implementing this, I was wondering if the class Value was really useful, I think it would be better to directly expose default_value (renamed it to standard_value), don't you think ? It would make the code easier and it would remove the virtuality of the functions.

I tried not to screw you code style, but my editor is not configured for that, so I may have made some mistakes on that side.