I'm using boost program_options to parse command line arguments, and I'm trying to make use of the positional arguments feature. The goal is to make typing "--tool" optional, and to assume that the first argument is the tool if "--tool" isn't typed explicitly.
This is apparently not exactly the way boost arguments is meant to work, as stated here in the boost docs: https://www.boost.org/doc/libs/1_54_0/doc/html/boost/program_options/positional_opt_idp87697168.html it says "The primary assumption is that only the relative order of the positional options themselves matters, and that any interleaving ordinary options don't affect interpretation of positional options."
Which is the opposite of what I want. In my case, I have an argument "--tool" that can also be the first positional argument, but right now if someone uses --tool explicitly, any further positional or unregistered argments get interpreted as a second --tool option, which throws on store(). I'd like it to end up as whatever the next positional argument should be.
I'm guessing I have to go modify the return value of command_line_parser myself to clean it all up? Or is there some feature I'm overlooking?