program_options suggestion

I really like program_options from Vladimir Prus. Thanks for adding bool_switch! One suggestion. We now have bool_switch, so a variable can default to off, and turn on with --option (without having to say --option=true). How about begin able to say --no-option to turn it off? This would make the interface consistent with gnu standards. If it's not too difficult it would make a good addition.

Neal D. Becker wrote: Hi Neal,
I really like program_options from Vladimir Prus. Thanks for adding bool_switch!
You're welcome. Uph.. I really need to take the time to add the last feature and add the library to CVS. Hopefully next week.
One suggestion. We now have bool_switch, so a variable can default to off, and turn on with --option (without having to say --option=true).
How about begin able to say --no-option to turn it off? This would make the interface consistent with gnu standards. If it's not too difficult it would make a good addition.
Actually, the "custom_syntax.cpp" example shows how it's possible. It handles "-fno-something" syntax but a change to handle "--no-something" would be trivial. If that works for you, we can consider adding such logic into library itself. - Volodya
participants (2)
-
Neal D. Becker
-
Vladimir Prus