Philip Top

Results 298 comments of Philip Top

I believe that the internal use of unique_ptr for several of the objects prohibits copy construction, and the virtual destructor is needed for the polymorphism in place on App objects....

move constructors can be problematic with the virtual calls. I am guessing most of the use cases for polymorphism it wouldn't be an issue since there is no additional data...

The biggest issue I have experienced is usually returning a polymorphic object by value from a function then using it to construct a base class object with a move constructor...

actually not sure explicit works with default move constructors. didn't seem to do anything in wandbox

Sorry for taking so long on this. Please use ``` using namespace std::literals; auto duration = 1s; CLI::App app; app.option_defaults()->ignore_case(); app.add_option_function("--duration", [&](auto&& a_value){ duration = std::chrono::seconds{a_value}; }, "valid units: sec,...

CLI11_PARSE terminates the program if help is called by using a return statement when executed from a main function. You can use exit(0) if you want to do the exit...

I don't know of any direct integrations. One other possibility would be to use the `each` functionality something like then you wouldn't have the extra loop in your main, I...

If you want the first one to think it is a vector then you can ``` void register_read_cmd(CLI::App& parent) { auto cmd = parent.add_subcommand("read", "parse input file(s)"); cmd->add_option("input", "file(s) to...

The boolean value at the option was removed in version 2.0. The Docs need to be updated. The second way you are doing it is correct.

We will leave this issue open until the docs get fixed. Thanks