Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excess positional arguments do not generate an error. #14

Closed
agoessling opened this issue Nov 26, 2020 · 0 comments
Closed

Excess positional arguments do not generate an error. #14

agoessling opened this issue Nov 26, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@agoessling
Copy link

If excess positional arguments are provided the parser does not raise an exception.

struct FileOptions {
  // Positional arguments
  // ./main <input_file> <output_file>
  std::string input_file;
  std::string output_file;
};
STRUCTOPT(FileOptions, input_file, output_file);

Executing ./main file1 file2 file3 does not raise an exception.

@p-ranav p-ranav added the bug Something isn't working label Nov 26, 2020
@p-ranav p-ranav self-assigned this Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants