1 Command, a C++ library for handling command line arguments
3 Designing to be used like follows:
7 void some_function(std::string str) {
8 std::cout << "Some function" << std::endl;
11 command::Command command(argc, argv, {
12 command::Option<std::string>("f", "File path", [](std::string value)->void { cout << "Sth: " << value << endl; }),
13 command::Argument<std::string>("File path", []()->void { cout << "Sth: " << value << endl; }),
14 command::Option<void>("help", "Help description", [](void)->void { cout << "Sth: " << value << endl; }),
15 command::Option<void>("verbose", "Verbose option description", &myClass->verbose),
16 command::Option<void>("verbose", "Verbose option description", some_function)