MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / main

Function main

examples/date_validator.cpp:28–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 "datetime[%Y-%m-%dT%H:%M:%S]");
27
28int main(int argc, char **argv) {
29
30 CLI::App app("custom validator testing");
31
32 std::string value;
33 app.add_option("--time", value, "enter a date in iso8601 format")->check(ISO8601)->required();
34
35 CLI11_PARSE(app, argc, argv);
36
37 std::cout << "date given = " << value << '\n';
38
39 return 0;
40}

Callers

nothing calls this directly

Calls 3

requiredMethod · 0.45
checkMethod · 0.45
add_optionMethod · 0.45

Tested by

no test coverage detected