-
Notifications
You must be signed in to change notification settings - Fork 435
Closed
Description
In the CLI11 tutorials it says that:
This will bind the flag -f to the boolean my_flag. After the parsing step, my_flag will be false if the flag was not found on the command line, or true if it was. By default, it will be allowed any number of times, but if you explicitly1 request ->take_last(false), it will only be allowed once; passing something like ./my_app -f -f or ./my_app -ff will throw a ParseError with a nice help description.
However, after including the CLI11.hpp file and using this kind of expression I get the error:
no member named 'take_last' in 'CLI::Option'
The expression I used is the following:
bool runSingleThread;
subcommand->add_flag("-s,--singleThread", runSingleThread, "Split execution into multiple threads")
->take_last(false);
Is there something I did wrong? Is this option implemented in a later version than the one I'm using?
Cheers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels