
On 01/-10/-28163 01:59 PM, Vladimir Prus wrote:
that patch of yours looks perfectly reasonable to me. It would seem that a style option, e.g. 'allow_intermixed' can be used to control this behaviour (with the current behaviour as default).
Can I just run the plan by you then? Actually looks even a little simpler than I was thinking. The docs don't discuss the style options really. Filenames are relative to the program_options directories: - cmdline.hpp Add a new value to 'enum style_t'. (I'll use 'allow_interspersed' if there's no objection) - src/cmdline.cpp and details/cmdline.hpp Take my patch from before and change "false /* or true for the behavior I want */" to "m_style & allow_interspersed" Then how do I use it? Do something like command_line_parser(argc, argv) .style(default_style | allow_interspersed) .run() ? Evan
As for testing, you can add a new function to tests/positional_options_test.cpp, and call it from main. The structure of existing tests should be straightfoward.
For avoidance of doubt, if you come up with a patch along these lines, I'll be happy to commit it.
Thanks, Volodya