jarro2783 / cxxopts

Lightweight C++ command line option parser
MIT License
4.16k stars 582 forks source link

optional handling for unhandled options #433

Closed jwinarske closed 2 months ago

jwinarske commented 3 months ago

I have a case where I want to store unhandled options in a std::vector<std::string> and use later.

I'm thinking adding a std::vector<std::string> parameter to the parse method with a default value of nullptr would suffice. If parameter was not nullptr the unhandled options would be stored in the vector reference. If nullptr, it would follow the existing logic.

Would you accept a PR for this?

jwinarske commented 2 months ago

already supported with result.unmatched()