Conversation
|
I'll have to get back to you on this one, I haven't forgotten it, but I can't comment further right now. |
|
I wonder if it is worth putting some help text in to let users know that something is a multitoken option. Other than that this looks good. |
|
Missing multitoken support is also the last bit preventing me from completely ditching boost program_options and switching to cxxopts fully. Would be really nice to have this. I'm assuming this would also work with |
The command-line argument syntax of generate-obj slightly changed: Coefficient values now need to be separated by a comma instead of spaces, e.g. `generate.obj.exe --model ... --shape-coefficients 1.0,-1.5`. If cxxopts merge jarro2783/cxxopts#444, we could potentially use their multitoken option - but I think the syntax is fine now as it is.
|
@jarro2783 I was just going by the Boost implementation which doesn't change the help text for the parameter, but if you would like to add a help text that's fine by me since it shouldn't affect backwards compatibility. @patrikhuber Yes, float works as well. Multitoken options use the same |
|
I'm not too fussed, I thought it might be good so that it is immediately obvious to the users of your program. |
|
Can you write a unit test? |
|
@maickrau, are you still tracking this? Will you be able to follow up on the review comments posted above? |
|
Did you still want to get this merged. Can you start with rebasing since the builds are now fixed up? |
Implements multitoken options from Boost.Program_options. A multitoken option will take values until the next option is given. This makes it possible to switch to cxxopts without breaking backwards compatibility for multitoken options, and also enables a slightly easier syntax for the user for options with multiple values.
Example code without multitoken which just takes multiple parameters and prints them:
Applying multitoken to option
-cwhile keeping-bas is:will now cause option
-cto take values until the next option is given:This change is