Created
May 8, 2014 13:49
-
-
Save klmr/10ff02ef491e05092b4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auto&& hello = command<int, std::string>{{ | |
| option{"--count", 1, "number of greetings"}, | |
| option{"--name", "", "the person to greet", flags::required}}, | |
| [](int count, std::string name) { | |
| for (auto i : range(0, count)) | |
| std::cout << "Hello " << name << '\n'; | |
| }}; | |
| int main(int argc, char* argv[]) { | |
| return hello(argc, argv); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment