8 using namespace command;
10 void option_function(std::string a) {
11 std::cout << "Help function " << a << std::endl;
14 int main(int argc, char *argv[]) {
16 Command command(argc, argv, {
17 new Option<void>("void", "void Test", [](void) {
18 std::cout << "VOID" << std::endl;
20 new Option<char>("char", "char Test", [](char a) {
21 std::cout << "char: " << a << std::endl;
23 new Option<bool>("bool", "bool Test", [](bool b) {
24 std::cout << "bool: " << b << std::endl;
26 new Option<int>("int", "int Test", [](int i) {
27 std::cout << "int: " << i << std::endl;
29 new Option<float>("float", "float Test", [](float f) {
30 std::cout << "float: " << f << std::endl;
32 new Option<std::string>("std::string", "std::string Test", [](std::string s) {
33 std::cout << "std::string: " << s << std::endl;
37 catch(const std::exception & e) {
38 std::cout << e.what() << std::endl;