Created
April 10, 2009 18:14
-
-
Save tyru/93200 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
| #include <iostream> | |
| #include <string> | |
| #include <cstdlib> | |
| struct foreach { | |
| foreach& | |
| operator()(const char* s) { | |
| std::cout << s << std::endl; | |
| return *this; | |
| } | |
| }; | |
| int | |
| main(int argc, char *argv[]) { | |
| foreach()("Hello")("C++")("World"); | |
| return EXIT_SUCCESS; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment