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

Add a default ctor to allow deferred parsing #47

Closed
xparq opened this issue Nov 2, 2023 · 0 comments
Closed

Add a default ctor to allow deferred parsing #47

xparq opened this issue Nov 2, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@xparq
Copy link
Owner

xparq commented Nov 2, 2023

Otherwise this couldn't work:

Args args (argc, argv); // or just Args args;

try {
    args.parse();  // nice and cosy place to catch errors!
    // or: args.parse(argc, argv);  // could also reset & reparse with other sets of args; could be handy!
} catch(...) {
    // boo!
}

if (args["flag"]) // use args...
@xparq xparq pinned this issue Nov 3, 2023
@xparq xparq added the enhancement New feature or request label Nov 3, 2023
@xparq xparq closed this as completed in e0c512b Nov 3, 2023
xparq added a commit that referenced this issue Nov 3, 2023
@xparq xparq unpinned this issue Nov 3, 2023
xparq added a commit that referenced this issue Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant