You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the order of arguments in command-line parsing error message (#1158)
CLI11 code prints the command-line arguments in reversed order in the
error message.
Code to reproduce:
```c++
#include <string>
#include <CLI/CLI.hpp>
int main(int argc, const char **argv)
{
CLI::App app{"Bug report app"};
std::string foo;
app.add_option("--foo", foo, "Foo option");
CLI11_PARSE(app, argc, argv);
return 0;
}
```
Reproduction:
```
$ g++ -Wall -Wextra -I CLI11/include/ cli11-bug-order-in-error.cpp -o cli11-bug-order-in-error && ./cli11-bug-order-in-error --foo bar --fizz buzz
The following arguments were not expected: buzz --fizz
Run with --help for more information.
```
Expected result:
```
The following arguments were not expected: --fizz buzz
Run with --help for more information.
```
0 commit comments