clipp
clipp copied to clipboard
parse(): support both `const char **argv` and `char **argv` interface version
parse(): support both const char **argv
and char **argv
interface version.
Some codebase have argv as const char **argv
or const char *argv[]
while others have it without the const
modifier. This takes care of that and makes clipp a drop-in for both styles.
(cherrypicked off https://github.com/GerHobbelt/clipp master branch; original commit tested with latest MSVC2019)
Maybe changing char* argv[]
to const char* const* argv
is enough. Non-const arguments would be auto converted to const type.