Repository navigation
add a function to get the remaining arguments in a valid order - #265
Conversation
…rse. and add rvalue reference overloads for parse and _parse so args is not refilled if not needed.
|
TODO:
|
Codecov Report
@@ Coverage Diff @@
## master #265 +/- ##
==========================================
- Coverage 100% 99.71% -0.29%
==========================================
Files 12 12
Lines 2737 2775 +38
==========================================
+ Hits 2737 2767 +30
- Misses 0 8 +8
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #265 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 12 12
Lines 2737 2767 +30
=====================================
+ Hits 2737 2767 +30
Continue to review full report at Codecov.
|
…ector) remove impossible to reach branches in _parse function
|
This also fixed a potential bug if the main app had a name and a subcommand terminator was used. |
|
Ready for review? |
|
yes |
|
I thought about making it a template, I also thought about making the parse take a const ref to a vector but then forcing the one that doesn't modify becomes a little more awkward. So I wasn't entirely clear what the best method of dealing with this was. In any case the main reason was so you could call parse(app.remaining_for_passthough()) without the compiler getting mad at you. |
See issue #264
This adds function remaining_for_passthrough() --> different name suggestions are welcome!
It also adds some overloads with rvalue references so parse can take the function directly when used in a cascade fashion, and not do extra work or generate warnings when used. The parse from string and (argc, argv) also use this overload since the args can't be used any further.