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_flag is ambiguous with c++20 #662

Closed
steffenb7333 opened this issue Oct 26, 2021 · 0 comments · Fixed by #663
Closed

add_flag is ambiguous with c++20 #662

steffenb7333 opened this issue Oct 26, 2021 · 0 comments · Fixed by #663

Comments

@steffenb7333
Copy link

Code:

#include <CLI/CLI.hpp>

int main()
{
    auto app = CLI::App{"test"};
    auto flag = app.add_flag("--flag", "desc");
    return 0;
}

Compiling with
g++ -std=c++20 cli11.cpp

results in

cli11.cpp: In function 'int main()':
cli11.cpp:6:29: error: call of overloaded 'add_flag(const char [7], const char [5])' is ambiguous

CLI11 is version 2.1.2. g++ is 11.2.0.

@phlptp phlptp linked a pull request Oct 26, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant