-
Notifications
You must be signed in to change notification settings - Fork 152
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
Weird problem with order of elements in the cli spec #42
Comments
I came here because I think I have the same thing. I spent quite some time messing with stuff because:
creates this situation where options that are later in the list can block earlier ones (for example,
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This program gives:
test(false)=Failed
test(true)=OK
With HEAD on Linux Ubuntu with gcc 9.2.1 and clang 9.0.0.
I don't think the changein order should matter.
#include "clipp.h"
#include
#include
using namespace clipp;
using namespace std;
enum class Mode
{
Unknown,
Error,
Help,
DeviceList,
DeviceInfo
};
bool test_(int argc, char* argv[], bool order)
{
Mode m = Mode::Unknown;
string target;
}
const char* test(bool order)
{
static char* argv[] = {
(char*)"app", (char*)"deviceinfo", (char*)"foo", nullptr
};
}
int main(int, char*[])
{
std::cout << "test(false)=" << test(false) << std::endl;
std::cout << "test(true)=" << test(true) << std::endl;
return 0;
}
<<<<<<<
bug.cpp.gz
The text was updated successfully, but these errors were encountered: