m4n71k0r

Untitled

Jun 16th, 2012
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <functional>
  3. #include <string>
  4.  
  5. const std::string operator "" _t(const char* s)
  6. {
  7.   return std::string("^_^ ") + s;
  8. }
  9.  
  10. int main(int argc, char **argv)
  11. {
  12.   auto l = [](int n)
  13.   {
  14.     return [n](std::function<int(int)> f)
  15.     {
  16.       return f(n);
  17.     };
  18.   };
  19.  
  20.   std::cout << l(1)([](int n)
  21.   {
  22.     return n + 5;
  23.   }) << "\t" << 0xfde12381276_t << std::endl;
  24.   return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment