Skip to content

The ability to reset the parser #402

@TLCFEM

Description

@TLCFEM
argparse::ArgumentParser program("program_name");
program.add_argument("-v", "--verbose");

The current implementation seems to disallow calling the following twice.

program.parse_args(std::vector<std::string>>);

Is there a mechanism to reset internal state?

This would be useful when there are multiple objects to configure, while each of them may take different sets of arguments.
The same parser can be reused, otherwise the parser needs to be recreated each time parsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions