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

Function main

tests/module_test/module_test.cpp:17–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15using CLI::ParseError;
16
17int main(int argc, char *argv[]) {
18 App app{"Module test"};
19
20 string value;
21 app.add_option("value", value, "A test value")->required();
22
23 try {
24 app.parse(argc, argv);
25 } catch(const ParseError &e) {
26 return app.exit(e);
27 }
28
29 std::println("OK: import cli11 module\nvalue = {}", value);
30
31 return 0;
32}

Callers

nothing calls this directly

Calls 4

parseMethod · 0.80
exitMethod · 0.80
requiredMethod · 0.45
add_optionMethod · 0.45

Tested by

no test coverage detected