Skip to content

parse_known_args did not check mutually_exclusive_groups #400

@Shaloc

Description

@Shaloc

I'm not sure if this is a feature.

argparse::ArgumentParser program {"program"};
auto &group = program.add_mutually_exclusive_group(true);
group.add_argument("-a").flag();
group.add_argument("-b").flag();

program.parse_known_args({"program", "-a", "-b"}); // did not throw
// program.parse_args({"program", "-a", "-b"}); // throws

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