-
Notifications
You must be signed in to change notification settings - Fork 362
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
rename the parse()
method and adjust documentation
#979
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #979 +/- ##
===========================================
+ Coverage 99.07% 100.00% +0.92%
===========================================
Files 18 18
Lines 4550 4573 +23
===========================================
+ Hits 4508 4573 +65
+ Misses 42 0 -42 ☔ View full report in Codecov by Sentry. |
@@ -196,7 +196,6 @@ this: | |||
```cpp | |||
int main(int argc, char** argv) { | |||
CLI::App app{"App description"}; | |||
argv = app.ensure_utf8(argv); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed? This is by far the best way to do this - parse()
/ parse_from_cli_args()
does black magic on some operating systems, while this reliably works everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this section of the documentation it is covering the most basic application, in a vast majority of applications this is not necessary. I can add it back if you think it valuable, but to me it creates a lot of potentially unnecessary questions when just getting started.
@@ -1460,7 +1457,11 @@ itself. | |||
> int main() { | |||
> CLI::App app; | |||
> // ... | |||
> CLI11_PARSE(app); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of CLI11_PARSE(one arg)
was to make this simpler to type, encouraging people to support unicode. This makes this "short" but magical method four lines long instead! It would better to just use the more reliable and safe method then (argv = app.ensure_utf8(argv);
), which is only one line longer.
Superseded by #987 |
Based on discussions in #974