cxxopts
cxxopts copied to clipboard
allow_unrecognized_options "eats up" the unrecognized options
Suppose I've set allow_unrecognized_options()
. I understand that I don't get those back as some map of option-name-to-value (as discussed in #239). But - why are these options removed from the command-line? If the command-line is touched at all, only the options that get parsed should be removed from it.
That sounds like a bug. I'll check that out.
By "removed from the command line" I mean that argv is moved past them.
That sounds like a bug. I'll check that out.
Have you had a look at this?
Sorry I don't remember. I will try to do that soon. I think by the date this was for v2. If it's fixed in v3 is that good enough for you, or would you want a fix to the v2 branch?
@jarro2783 : For me, v3 is fine. But I'm just one person, and maybe others would be interested in a back-port. It is, after all, a bug fix (and I'm guessing it should be a lot of code).
Also - I don't know what the significant differences are between v2.x and v3.0, since the release page doesn't really explain, and you don't have a "roadmap" or "history" page.
This works correctly now, and there is a note at the top of the README about unmatched arguments. I have just added it to the example file as well.
I checked out the latest v2 code, and it does seem like unrecognised arguments are still left in argv.
So, close this?